-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (39 loc) · 1.14 KB
/
build_docs.yml
File metadata and controls
48 lines (39 loc) · 1.14 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
name: Docs Building
on:
workflow_dispatch:
# Add this block to give the GITHUB_TOKEN write access
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4 # Updated to latest version
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4 # Updated to latest version
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install sphinx sphinx-rtd-theme
- name: Install PySoftK
run: |
pip install .
- name: Sphinx apidocs
shell: bash
run: |
cd docs
# Note: Ensure these paths match your repo structure
sphinx-apidoc -o ./source ../pysoftk
make html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
# Use the built-in token instead of a custom secret
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./docs/build/html