This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openserverless-site.git
The following commit(s) were added to refs/heads/main by this push:
new 583d206 pipeline changed (#29)
583d206 is described below
commit 583d2065d54db8a8c99d19366c0a9a5de99e5179
Author: Bruno Salzano <[email protected]>
AuthorDate: Mon Oct 28 13:49:35 2024 +0100
pipeline changed (#29)
* fixed k3s/_index
* chore: download page
Completed doc in download page
* chore: fix tutorial page
fixed download link in tutorial
* chore: asf links
added asf link and removed external assets
* chore: draft on gke and openshift
added draft true in frontmatter for gke and openshift
* chore: css fix
fixed a css for top menu
* fix: github action
changed github action. Moved the publish action on pull_request closed and
merged is true
* fix: github action
changed github action. Moved the publish action on pull_request closed and
merged is true (or, like before, on push to main)
---------
Co-authored-by: bruno <[email protected]>
---
.github/workflows/build.yml | 67 ++++++++++++++++++++++++---------------------
1 file changed, 36 insertions(+), 31 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 744188f..9b76404 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,10 +1,14 @@
-name: test
+name: website
on:
+ pull_request:
+ types: [closed]
+
push:
branches:
- main
+
env:
PUBLISH_DIRECTORY: public
@@ -12,35 +16,36 @@ permissions:
contents: write
jobs:
- tests:
+ publish:
+ if: github.event_name == 'push' || github.event.pull_request.merged ==
true && github.event.pull_request.base.ref == 'main'
runs-on: ubuntu-latest
steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Checkout Production
- if: github.ref_name == 'main'
- uses: actions/checkout@v4
- with:
- ref: asf-site
- path: ${{ env.PUBLISH_DIRECTORY }}
- - name: Install Asciidoctor
- run: |
- sudo apt-get update
- sudo apt-get install -y asciidoctor
- - name: Prepare
- working-directory: ${{ env.PUBLISH_DIRECTORY }}
- run: |
- rm -rf stylesheets
- - name: Build Hugo site
- run: |
- npm install
- npm run clean
- npm run build:production
- - name: Deploy to ASF
- working-directory: ${{ env.PUBLISH_DIRECTORY }}
- run: |
- git config --global user.name "github-actions[bot]"
- git config --global user.email
"ops+github-actions[bot]@users.noreply.github.com"
- git add .
- git commit -m "Published changes from $GITHUB_SHA"
- git push
\ No newline at end of file
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ - name: Checkout Production
+ if: github.ref_name == 'main'
+ uses: actions/checkout@v4
+ with:
+ ref: asf-site
+ path: ${{ env.PUBLISH_DIRECTORY }}
+ #- name: Install Asciidoctor
+ # run: |
+ # sudo apt-get update
+ # sudo apt-get install -y asciidoctor
+ - name: Prepare
+ working-directory: ${{ env.PUBLISH_DIRECTORY }}
+ run: |
+ rm -rf stylesheets
+ - name: Build Hugo site
+ run: |
+ npm install
+ npm run clean
+ npm run build:production
+ - name: Deploy to ASF
+ working-directory: ${{ env.PUBLISH_DIRECTORY }}
+ run: |
+ git config --global user.name "github-actions[bot]"
+ git config --global user.email
"ops+github-actions[bot]@users.noreply.github.com"
+ git add .
+ git commit -m "Published changes from $GITHUB_SHA"
+ git push
\ No newline at end of file