Don't run the release task until tests have passed (#745)

This commit is contained in:
Natalie Weizenbaum 2023-06-26 13:52:12 -07:00 committed by GitHub
parent 467243a0d8
commit 9fb50a9c9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,6 @@ on:
push:
branches: [main, 'feature.*']
pull_request:
types: [reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@ -44,15 +43,15 @@ jobs:
release:
name: Deploy
runs-on: ubuntu-latest
if:
github.event_name == 'push' &&
github.ref == 'refs/heads/main' &&
github.repository == 'sass/sass-site'
needs: [test, lint]
if: github.event_name == 'push' &&
github.ref == 'refs/heads/main' &&
github.repository == 'sass/sass-site'
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
# Pushing to the production branch will trigger Netlify's release process.
- run: git push -f origin main:production
# Pushing to the production branch will trigger Netlify's release process.
- run: git push -f origin main:production