-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.26 KB
/
documentation_deployment.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
name: Documentation Deployment
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3 # Already up-to-date
- name: Set up Python
uses: actions/setup-python@v4 # Updated to v4 for consistency
with:
python-version: '3.10'
- name: Cache Python packages
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/docs/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt # Install documentation dependencies
- name: Build documentation
run: |
mkdocs build
- name: Configure Git for GH Pages
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site