-
Notifications
You must be signed in to change notification settings - Fork 10
56 lines (46 loc) · 1.22 KB
/
docs.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
56
name: GH Pages Deploy
on:
push:
branches: [main]
paths-ignore:
- "docs/**"
pull_request:
branches: [main]
paths-ignore:
- "docs/**"
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Typst
uses: yusancky/setup-typst@v3
id: setup-typst
- name: Install Mdbook
uses: extractions/setup-crate@v1
with:
owner: rust-lang
name: mdBook
- name: Install Mdbook admonish
uses: extractions/setup-crate@v1
with:
owner: tommilligan
name: mdbook-admonish
- name: Install Mdbook typst doc
uses: baptiste0928/cargo-install@v3
with:
crate: mdbook-typst-doc
git: https://github.com/fenjalien/mdbook-typst-doc
tag: 0.1.2
- name: Build
run: |
typst compile docs/src/reference.typ --root ./
cd docs
mdbook build
- name: Deploy to GitHub Pages
if: ${{ github.event_name != 'pull_request' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/book