-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1019 Bytes
/
deploy.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
name: Deploy Documentation
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# Step 2: Set up Python environment
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
# Step 3: Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Step 4: Build MkDocs site
- name: Build MkDocs site
run: mkdocs build --strict
# Step 5: Deploy MkDocs site to GitHub Pages
- name: Deploy MkDocs site to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site