Merge pull request #203 from pedro-mealha/dependabot/npm_and_yarn/sty… #201
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: Main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: staging | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install dependencies | |
run: | | |
npm install netlify-cli -g | |
npm ci | |
- name: Build | |
run: | | |
netlify build --context=staging | |
env: | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
- name: Deploy | |
run: | | |
netlify deploy -m '${{ github.sha }}' | |
env: | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} |