-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (43 loc) · 1.06 KB
/
deploy.yml
File metadata and controls
55 lines (43 loc) · 1.06 KB
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: Deploy
on:
workflow_run:
workflows: ["Update DB"]
types: [completed]
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: write
concurrency:
group: gh-pages
cancel-in-progress: true
jobs:
deploy:
if: |
github.event_name != 'workflow_run' ||
github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Ensure DB is in dist
run: |
test -f ./public/CollecTF.db.gz
cp ./public/CollecTF.db.gz ./dist/CollecTF.db.gz
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist