-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (50 loc) · 1.61 KB
/
static.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
57
58
59
60
61
62
63
name: Deploy MkDocs to GitHub Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
# Step 3: Install package and set PYTHONPATH
- name: Install package and documentation dependencies
run: |
export PYTHONPATH=$PYTHONPATH:$(pwd)/src
# pip install -e .
# Step 4: Install MkDocs and required plugins
- name: Install MkDocs and plugins
run: |
pip install mkdocs mkdocs-material mkdocs-autorefs mkdocstrings[python] mkdocs-jupyter pymdown-extensions termynal mkdocs-minify-plugin
# Step 5: Debug environment to check installed packages
- name: Debug environment
run: |
python -m pip freeze
python -m mkdocs --version
# Step 6: Build the MkDocs site with verbose output
- name: Build MkDocs site
run: mkdocs build --verbose --strict
# Step 7: Upload the generated site directory as an artifact for GitHub Pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './site'
# Step 8: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4