-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (32 loc) · 845 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 }}