From 67a588ce31b7a57ddea36d45b9a652e76b8f6e9b Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Fri, 23 Jun 2023 16:39:14 -0700 Subject: [PATCH] Push to production whenever main is updated --- .github/workflows/{test.yml => ci.yml} | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) rename .github/workflows/{test.yml => ci.yml} (64%) diff --git a/.github/workflows/test.yml b/.github/workflows/ci.yml similarity index 64% rename from .github/workflows/test.yml rename to .github/workflows/ci.yml index 8cfc8d34d..58a603b88 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,8 @@ -name: Lint & Test +name: CI on: push: + branches: [main, 'feature.*'] pull_request: types: [reopened] @@ -39,3 +40,19 @@ jobs: run: npm ci - name: Lint run: npm run lint:ci + + release: + name: Deploy + runs-on: ubuntu-latest + 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 }} + + # Pushing to the production branch will trigger Netlify's release process. + - run: git push -f origin main:production