-
Notifications
You must be signed in to change notification settings - Fork 548
38 lines (35 loc) · 1.08 KB
/
sphinx.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
# Github Actions workflow to generate documentation
# Uses the following shared task definitions:
# - (checkout, upload artifact) from Github
# - sphinx-action maintained by @ammaraskar
name: Sphinx build
# Controls when the action will run.
# Triggers the workflow on push or pull request events.
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # Updated to use v4
- name: List directory contents
run: ls -la "$GITHUB_WORKSPACE"
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install Sphinx and dependencies
run: pip install sphinx sphinx_markdown_builder
- name: Check docs directory and Build Documentation
run: |
if [ -d "$GITHUB_WORKSPACE/doc" ]; then
cd "$GITHUB_WORKSPACE/doc" && ls -la && make doc
else
echo "Documentation directory not found!"
exit 1
fi
- uses: actions/upload-artifact@v3
with:
name: Documentation
path: "$GITHUB_WORKSPACE/doc/_build/html/"