-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (36 loc) · 1.08 KB
/
preview.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: Preview
on:
pull_request:
pull_request_target:
types:
- labeled
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
preview:
runs-on: ubuntu-22.04
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) ||
(github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe to test'))
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
cache: npm
- run: npm ci
- run: npm run build
- uses: nwtgck/[email protected]
with:
publish-dir: docs
alias: deploy-preview-${{ github.event.number }}
enable-commit-comment: false
fails-without-credentials: true
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
timeout-minutes: 1
- uses: actions/upload-artifact@v4
with:
path: docs