From eb249c82805d1045d3571ca5e48e3f853a5fed58 Mon Sep 17 00:00:00 2001 From: Winford Date: Mon, 27 Jan 2025 18:50:23 +0000 Subject: [PATCH] Improve CI workflow Changes to workflow triggers to ensure build tests are run on pushes to personal repos, and on pull_requests to atomvm_www. Adds the current top commit to the generated commit message for more informative logs in the Production branch. Signed-off-by: Winford --- .github/workflows/build.yml | 8 ++++++-- .github/workflows/publish.yml | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fe6be757..beea08c6c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ # # This is a workflow for atomvm/atomvm_www to Publish atomvm.net documentation using GitHub Pages -name: Build +name: Build Test # Controls when the workflow will run on: @@ -13,6 +13,9 @@ on: push: branches: [ "*" ] + pull_request: + branches: [ "*" ] + # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -71,4 +74,5 @@ jobs: git config --local user.email "atomvm-doc-bot@object.stream" git config --local user.name "AtomVM Doc Bot" git add . - git commit -m "Update Documentation" + git commit -m "Update Website Frontend: ${{ github.event.head_commit.message }}" + git log -1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f9e1a9e86..e7374cced 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -64,7 +64,6 @@ jobs: touch www/.nojekyll - name: Commit files - if: github.repository == 'atomvm/atomvm_www' working-directory: ./www run: | git checkout Production @@ -72,7 +71,9 @@ jobs: git config --local user.email "atomvm-doc-bot@object.stream" git config --local user.name "AtomVM Doc Bot" git add . - git commit -m "Update Documentation" + git commit -m "Update Website Frontend\n${{ github.event.workflow_run.head_commit.message }}" + git log -1 + - name: Push changes if: github.repository == 'atomvm/atomvm_www' working-directory: ./www