Corrigindo erro de deployment. #11
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: Build and Deploy to Gatsby on every commit | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'master' | |
# schedule: | |
# - cron: '0 */2 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# https://github.com/actions/setup-node#usage | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '16.x' | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run build | |
# Deploy the gatsby build to Netlify | |
- uses: netlify/actions/cli@master | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
with: | |
args: deploy --dir=public --prod | |
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]' |