-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (34 loc) · 986 Bytes
/
build_docs.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
name: Deploy Sphinx Docs to GitHub Pages
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository
- name: Check out the repository
uses: actions/checkout@v2
# Step 2: Set up Python
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
# Step 3: Install dependencies
- name: Install dependencies
run: |
pip install sphinx furo sphinx-toggleprompt sphinx-copybutton
# Step 4: Build the docs
- name: Build the docs
run: |
sphinx-build -b html docs docs/_build/html
# Step 5: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GH_PAT }} # Use the personal access token
publish_dir: docs/_build/html