-
Notifications
You must be signed in to change notification settings - Fork 116
63 lines (52 loc) · 1.57 KB
/
deploy_docs.yml
File metadata and controls
63 lines (52 loc) · 1.57 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
name: Deploy Docs
on:
push:
branches: [master]
paths:
- 'docs_src/**'
- 'src/hello_imgui/doc_*.src.md'
- 'src/hello_imgui/hello_imgui.h'
- 'src/hello_imgui/runner_params.h'
- 'src/hello_imgui/hello_imgui_api.md'
- 'tools/doc/**'
- 'README.src.md'
- '.github/workflows/deploy_docs.yml'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: typst-community/setup-typst@v4
- name: Install dependencies
run: pip install -r docs_src/requirements.txt
- name: Build docs
env:
BASE_URL: /hello_imgui/book/
run: |
python tools/doc/process_md_docs.py
cd docs_src && jupyter book build --html && jupyter book build --pdf
- name: Prepare pages artifact
run: |
mkdir -p _site
touch _site/.nojekyll
echo '<head><meta http-equiv="refresh" content="0; URL=book/"></head>' > _site/index.html
cp -a docs_src/_build/html _site/book
cp docs_src/_build/exports/hello_imgui_book.pdf _site/hello_imgui_book.pdf
- uses: actions/upload-pages-artifact@v3
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4