Merge pull request #4727 from piemasters/dependabot/npm_and_yarn/stor… #9670
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Deploy' | |
on: push | |
jobs: | |
netlify-deploy: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' && github.actor != 'dependabot[bot]' | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '18.x' | |
- name: Install dependencies | |
run: yarn | |
- name: Build project | |
run: yarn build | |
env: | |
GATSBY_DISQUS_NAME: ${{ secrets.GATSBY_DISQUS_NAME }} | |
GA_TRACKING_ID: ${{ secrets.GA_TRACKING_ID }} | |
OPT_CONTAINER_ID: ${{ secrets.OPT_CONTAINER_ID }} | |
- name: Run tests | |
run: yarn test | |
- name: Deploy to Netlify | |
run: npx netlify-cli deploy --prod --dir=public | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
# - name: Deploy to netlify | |
# uses: netlify/actions/cli@master | |
# with: | |
# args: deploy --dir=public --prod | |
# env: | |
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
# NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |