From 8ed5fb4fb1659e2884be6de330586654391a0e1e 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 deploy job instead of step Moves the if condition up one level from the deploy step to the deploy job for both the deploy-usersguide and deploy-osalguide. --- .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 +