-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.48 KB
/
build_doc.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
name: "build doc"
on:
push:
branches:
- master
jobs:
build-doc:
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message,'doc:')"
permissions: write-all
steps:
- name: "check out quartz custom template "
uses: actions/checkout@v4
with:
repository: "nhannht/quartz"
fetch-depth: 0
ref: nhannht
path: quartz
- name: check out this repo
uses: actions/checkout@v4
with:
fetch-depth: 0
path: historica
- name: set up node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: build and deploy doc
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
cd quartz
npm install
npm install wrangler
cp ../historica/historica_document/* ./content/ -r
cp ../historica/quartz.config.ts ./
cp ../historica/quartz.layout.ts ./
cp ../historica/wrangler.toml ./
npx quartz build
npx wrangler pages deploy