-
Notifications
You must be signed in to change notification settings - Fork 33
39 lines (37 loc) · 1.22 KB
/
generate-demo-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
37
38
39
name: Generate Demo Preview
on:
pull_request:
# To manage 'surge-preview' action teardown, add default event types + closed event type
types: [opened, synchronize, reopened, closed]
branches:
- master
paths:
- '.github/actions/build-setup/**/*'
- '.github/actions/custom-surge-preview/**/*'
- '.github/workflows/generate-demo-preview.yml'
- 'config/**/*'
- 'dev/**/*'
- 'scripts/prepare-demo-for-publish.mjs'
- 'src/**/*'
- '.nvmrc'
- 'package.json'
- 'package-lock.json'
- 'postcss.config.cjs'
- 'tailwind.config.js'
- 'tsconfig.json'
- 'vite.config.js'
jobs:
demo_preview: # keep unique across jobs using surge preview (preview url and PR comment id)
runs-on: ubuntu-22.04
permissions:
pull-requests: write # surge-preview: PR comments
steps:
- uses: actions/checkout@v4 # access to the local action
- name: surge preview
uses: ./.github/actions/custom-surge-preview
with:
artifact-name: demo
build-preview-command: npm run demo
build-preview-dist: build/demo
github-token: ${{ secrets.GITHUB_TOKEN }}
surge-token: ${{ secrets.SURGE_TOKEN }}