-
Notifications
You must be signed in to change notification settings - Fork 32
32 lines (30 loc) · 1 KB
/
build-demo.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
name: Build Demo
on: [push]
permissions:
contents: read
jobs:
deploy:
permissions:
contents: write # for peaceiris/actions-gh-pages to push pages branch
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '16'
- run: npm install
working-directory: ./javascript
- run: npm install
working-directory: ./demo
- run: npm run build
working-directory: ./demo
- name: Publish Demo
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./demo/static