From 5433c86ec464779751d07212053ef7ef898cc181 Mon Sep 17 00:00:00 2001 From: Doug Massay Date: Mon, 12 Aug 2024 09:27:36 -0400 Subject: [PATCH] Make website update dependent upon successful test completion --- .github/workflows/pages.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 71f0470..5edb7d2 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -3,12 +3,12 @@ name: Deploy static content to Pages on: # Runs on pushes targeting the default branch - push: - branches: ["master"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - + #push: + workflow_run: + # Only run after test & build action completes + workflows: ["Test and Build Sigil Guide"] + types: + - completed # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read @@ -25,6 +25,8 @@ env: PAGESURL: https://sigil-ebook.com/sigil-user-guide/index2.html?epub=epub_content/guide jobs: +# Only update pages website if test build action completess successfully +if: ${{ github.event.workflow_run.conclusion == 'success' }} # Single deploy job since we're just deploying deploy: environment: @@ -65,4 +67,4 @@ jobs: path: 'view2/' - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: actions/deploy-pages@v4