Move CI deploy steps conditional to job level

This commit is contained in:
Christopher C. Wells 2021-11-19 11:39:15 -05:00
parent 828e9ffa3f
commit 2fea4c8806
1 changed files with 3 additions and 6 deletions

View File

@ -61,13 +61,10 @@ jobs:
deploy:
needs: test
runs-on: ubuntu-latest
env:
DEPLOY_DEMO: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
steps:
- if: ${{ env.DEPLOY_DEMO }}
uses: actions/checkout@v2
- if: ${{ env.DEPLOY_DEMO }}
name: Deploy demo
- uses: actions/checkout@v2
- name: Deploy demo
uses: akhileshns/heroku-deploy@v3.12.12
with:
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}