-
Notifications
You must be signed in to change notification settings - Fork 296
42 lines (33 loc) · 986 Bytes
/
deploy-site.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
39
40
41
42
name: Deploy site
on: push
jobs:
deploy-site:
name: Deploy site
runs-on: ubuntu-latest
env:
CI: true
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- uses: pnpm/action-setup@master
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm i
- name: Build packages
run: pnpm run build
- name: Build site
run: pnpm --filter "./site" build
- name: Draft deploy site to Netlify
run: pnpm --filter "./site" deploy:branch
if: github.ref != 'refs/heads/master'
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
- name: Deploy site to Netlify
run: pnpm --filter "./site" deploy:prod
if: github.ref == 'refs/heads/master'
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}