-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (46 loc) · 1.44 KB
/
deploy_docs.yml
File metadata and controls
57 lines (46 loc) · 1.44 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
name: Deploy Docs
on:
# Trigger: main or basic-dev branch has push
push:
branches:
- main
- basic-dev # You can test the effect on the development branch
# Allow manual trigger (click the button on the Actions page)
workflow_dispatch:
# Permission setting: must give write permission to push to gh-pages branch
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# 1. Pull code
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Pull full history, some mkdocs plugins may need git information
# 2. Set up Python environment
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
# 3. Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install mkdocs-material
- name: Generate Puzzle Docs
run: |
python scripts/gen_docs.py
- name: Build MkDocs
run: mkdocs build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
force_orphan: true
user_name: "github-actions[bot]"
user_email: "41898282+github-actions[bot]@users.noreply.github.com"