Build Sphinx Documentation and check links #6
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
name: Build Sphinx Documentation and check links | |
on: | |
schedule: | |
# Weekly, at 03:00 on Monday UTC time | |
- cron: "0 3 * * 1" | |
pull_request: | |
paths: | |
- ".github/workflows/sphinx.yml" | |
- "docs/**" | |
- "README.md" | |
- ".readthedocs.yaml" | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/sphinx.yml" | |
- "docs/**" | |
- "README.md" | |
- ".readthedocs.yaml" | |
workflow_dispatch: | |
jobs: | |
build-docs: | |
name: Build Sphinx Documentation | |
permissions: | |
contents: write | |
if: github.repository == 'jupyter/docker-stacks' || github.event_name != 'schedule' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo ⚡️ | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set Up Python 🐍 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install Doc Dependencies 📦 | |
run: | | |
pip install --upgrade pip | |
pip install --upgrade -r docs/requirements.txt | |
- name: Build Documentation 📖 | |
run: make docs | |
- name: Check Documentation URLs 🔗 | |
run: make linkcheck-docs || make linkcheck-docs |