-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (63 loc) · 2.11 KB
/
depoly-production.yaml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Deploy to site branch on private vault repository
on:
repository_dispatch: # triggered by vault push
types: [build_static]
push:
branches:
- hugo
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- name: checkout zettelkasten
uses: actions/checkout@v3
with:
repository: chaosarium/Zettelkasten
token: ${{ secrets.VAULT_PAT }}
path: zettelkasten
- name: checkout quartz plus
uses: actions/checkout@v3
with:
repository: chaosarium/quartz-plus
path: quartz-plus
- name: copy over config file
working-directory: ./quartz-plus
run: |
rm ./data/config.yaml
cp ../zettelkasten/config.yaml ./data/config.yaml
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install python_frontmatter==1.0.0
- name: Run Preprocess Script
working-directory: ./quartz-plus
run: python preprocess.py --source_path "../zettelkasten" --target_path "content" --target_attachment_path "static/attachments" > /dev/null
- name: Build Link Index
uses: jackyzha0/[email protected]
with:
index: true
input: quartz-plus/content
output: quartz-plus/assets/indices
root: quartz-plus
- name: Run Postprocess Script
working-directory: ./quartz-plus
run: sudo python postprocess.py
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.101.0'
extended: true
- name: Build
working-directory: ./quartz-plus
run: hugo --minify --destination "../public" --baseURL ${{ secrets.BASEURL }}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.VAULT_PAT }}
external_repository: chaosarium/Zettelkasten
publish_dir: ./public
publish_branch: site # deploying branch