forked from aiscript-dev/aiscript
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.23 KB
/
gh-pages.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
43
44
45
46
47
48
49
50
51
52
53
54
55
name: GitHub Pages
on:
push:
branches:
- master
pull_request:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 20.x
- name: AiScript Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: AiScript Install dependencies
run: npm ci
- name: AiScript Build
run: npm run build
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: npm-playground-${{ hashFiles('playground/package-lock.json') }}
restore-keys: npm-playground-
- name: Install dependencies
run: npm ci
working-directory: ./playground
- name: Build
run: npm run build
working-directory: ./playground
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./playground/dist