Replacing Sphinx Build Action - with simpler approach #2791
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
- name: List Documentation Folder | |
run: ls -la "$GITHUB_WORKSPACE/doc" | |
- 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 sphinx_rtd_theme | |
- name: Check docs directory and Build Documentation | |
run: | | |
if [ -d "$GITHUB_WORKSPACE/doc" ]; then | |
cd "$GITHUB_WORKSPACE/doc" && make html | |
else | |
echo "No Documenation Found!" | |
exit 1 | |
fi | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Documentation | |
path: "$GITHUB_WORKSPACE/doc/_build/html/" | |