-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (74 loc) · 2.1 KB
/
Copy pathdeploy.yml
File metadata and controls
75 lines (74 loc) · 2.1 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write # To push a branch
pages: write # To push to a GitHub Pages site
id-token: write # To update the deployment status
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: pnpm
- name: Install npm dependencies
run: pnpm install
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install markdown
- name: Build tooltips
run: pnpm run postinstall
- name: Install mdbook
uses: taiki-e/install-action@v2
with:
tool: mdbook@0.4.52
- name: Install mdbook-admonish
uses: taiki-e/install-action@v2
with:
tool: mdbook-admonish
- name: Run mdbook-admonish install
run: |
mdbook-admonish install
- name: Install mdbook-alerts
uses: taiki-e/install-action@v2
with:
tool: mdbook-alerts
- name: Install mdbook-embedify
uses: taiki-e/install-action@v2
with:
tool: mdbook-embedify
- name: Install mdbook-github-authors
uses: taiki-e/install-action@v2
with:
tool: mdbook-github-authors
- name: Build Book
run: |
# This assumes your book is in the root of your repository.
# Just add a `cd` here if you need to change to another directory.
mdbook build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: "book"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4