Skip to content

Replacing Sphinx Build Action - with simpler approach #2785

Replacing Sphinx Build Action - with simpler approach

Replacing Sphinx Build Action - with simpler approach #2785

Workflow file for this run

# 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/docs" ]; then
cd "$GITHUB_WORKSPACE/docs" && ls -la && make doc
else
echo "Documentation directory not found!"
exit 1
fi
- uses: actions/upload-artifact@v3
with:
name: Documentation
path: "$GITHUB_WORKSPACE/docs/_build/html/"