-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (46 loc) · 1.22 KB
/
build-deploy-wiki.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
name: Build and deploy wiki
on:
push:
branches:
- main
paths:
- 'wiki/**'
workflow_dispatch:
permissions:
actions: read
pages: write
id-token: write
jobs:
buildWiki:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
node-version: 20
- name: Checkout quartz
uses: actions/checkout@v4
with:
repository: 'jackyzha0/quartz'
# v4.3.1 tag
ref: 'v4.3.1'
path: 'quartz'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: npm install
working-directory: quartz
- name: Copy quarts.config.ts from wiki
run: cp wiki/quartz.config.ts quartz/quartz.config.ts
- name: Build wiki
run: npx quartz build -d '../wiki' -o '../wiki-public'
working-directory: quartz
- name: Upload wiki
uses: actions/[email protected]
with:
path: 'wiki-public'
name: wiki
- name: Deploy wiki
uses: actions/[email protected]
with:
artifact_name: wiki
token: ${{ secrets.GITHUB_TOKEN }}