Skip to content

Commit e5cc575

Browse files
authored
Merge pull request #86 from ulab-uiuc/claude/english-docs-mjc3on295s8e7dyx-ZZal1
Add GitHub Actions workflow for MkDocs deployment
2 parents fff3d37 + 2f4d127 commit e5cc575

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

‎.github/workflows/deploy-docs.yml‎

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
- 'mkdocs.yml'
10+
- '.github/workflows/deploy-docs.yml'
11+
workflow_dispatch: # Allow manual triggering
12+
13+
permissions:
14+
contents: write
15+
pages: write
16+
id-token: write
17+
18+
jobs:
19+
deploy:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0 # Fetch all history for git info
26+
27+
- name: Set up Python
28+
uses: actions/setup-python@v4
29+
with:
30+
python-version: '3.10'
31+
32+
- name: Cache dependencies
33+
uses: actions/cache@v3
34+
with:
35+
path: ~/.cache/pip
36+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
37+
restore-keys: |
38+
${{ runner.os }}-pip-
39+
40+
- name: Install MkDocs and dependencies
41+
run: |
42+
pip install mkdocs-material
43+
pip install mkdocs-git-revision-date-localized-plugin
44+
pip install mkdocs-minify-plugin
45+
pip install mkdocs-redirects
46+
47+
- name: Build documentation
48+
run: mkdocs build --strict
49+
50+
- name: Deploy to GitHub Pages
51+
run: mkdocs gh-deploy --force
52+

0 commit comments

Comments
 (0)