From 7216fa7566ea789963cc76ad102932e9a55ea0e4 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Fri, 6 Aug 2021 17:57:14 -0400 Subject: [PATCH] Fix #331, Skip documentation deploy job Moves the branch push check conditional "up" in the documentation build workflow. The check now happens at the deploy job level instead of the deploy step step for both the deploy-usersguide and deploy-osalguide. This saves time by preventing loading extra VMs in pull requests and other repository push events. --- .github/workflows/build-documentation.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-documentation.yml b/.github/workflows/build-documentation.yml index 97da9750f..17bfd0c65 100644 --- a/.github/workflows/build-documentation.yml +++ b/.github/workflows/build-documentation.yml @@ -153,11 +153,10 @@ jobs: key: usersguide-buildnum-${{ github.run_number }} deploy-usersguide: - needs: build-usersguide - # Name the Job name: Deploy Users Guide - # Set the type of machine to run on runs-on: ubuntu-18.04 + needs: build-usersguide + if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}} steps: - name: Cache cFS Build Environment for usersguide @@ -258,6 +257,7 @@ jobs: needs: build-osalguide name: Deploy Osal Guide runs-on: ubuntu-18.04 + if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}} steps: - name: Cache cFS Build Environment for osalguide @@ -268,7 +268,6 @@ jobs: key: osalguide-buildnum-${{ github.run_number }} - name: Deploy to GitHub - if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}} uses: JamesIves/github-pages-deploy-action@3.7.1 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -276,3 +275,4 @@ jobs: FOLDER: deploy CLEAN: false SINGLE_COMMIT: true +