Replacing Sphinx Build Action - with simpler approach #2787
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 # 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/" | |