forked from bangumi/frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 891 Bytes
/
build.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
name: Build
on:
push:
branches: [master]
paths-ignore:
- '**.md'
pull_request:
branches: [master]
paths-ignore:
- '**.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-js-env
- name: Build
run: pnpm build --mode stage
- run: echo ${{ github.event.number }} > packages/website/dist/pr_number
- name: upload website build artifact
uses: actions/upload-artifact@v3
with:
name: sites
path: packages/website/dist
- name: Deploy to Netlify
if: ${{ github.event_name == 'push' }}
run: netlify deploy --dir=packages/website/dist --alias="sites" --prod
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_PREVIEW_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_PREVIEW_SITE_ID }}