From f35184002899fd444f4f104104d3e539534d2ace Mon Sep 17 00:00:00 2001 From: Ariel Adams Date: Tue, 6 Apr 2021 09:04:40 -0500 Subject: [PATCH] Fix #234, Documentation and Guides Workflow Run on All Push Events --- .github/workflows/build-documentation.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-documentation.yml b/.github/workflows/build-documentation.yml index 5c61e5a03..84d619e07 100644 --- a/.github/workflows/build-documentation.yml +++ b/.github/workflows/build-documentation.yml @@ -3,17 +3,30 @@ name: Documentation and Guides # Run every time a new commit pushed to main or for pull requests on: push: - branches: - - main - pull_request: env: SIMULATION: native jobs: + #Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. + checks-for-duplicates: + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + concurrent_skipping: 'same_content' + skip_after_successful_duplicate: 'true' + do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' build-docs: + #Continue if checks-for-duplicates found no duplicates. Always runs for pull-requests. + needs: checks-for-duplicates + if: ${{ needs.checks-for-duplicates.outputs.should_skip != 'true' }} name: cFE Documentation runs-on: ubuntu-18.04 @@ -220,4 +233,3 @@ jobs: FOLDER: deploy CLEAN: false SINGLE_COMMIT: true -