-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (45 loc) · 1.36 KB
/
deploy-docs.yml
File metadata and controls
54 lines (45 loc) · 1.36 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
name: Deploy Documentation
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for git-revision-date-localized plugin
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install mkdocs-material
pip install mkdocs-git-revision-date-localized-plugin
pip install mkdocs-jupyter
pip install jieba
- name: Configure Git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Build and deploy documentation
run: |
mkdocs gh-deploy --force --clean --verbose
- name: Summary
run: |
echo "✅ Documentation deployed successfully!" >> $GITHUB_STEP_SUMMARY
echo "📚 View at: https://shychee.github.io/py_ai_tutorial/" >> $GITHUB_STEP_SUMMARY