Add dedicated examples for Sphinx domain directives #433
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: CI | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
schedule: | |
- cron: 0 0 * * MON # Run every Monday at 00:00 UTC | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
- uses: pre-commit/action@v2.0.0 | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
# pip caching | |
- name: Locate pip's cache | |
id: pip-cache | |
run: echo "::set-output name=dir::$(pip cache dir)" | |
- name: Persist cache across runs | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.pip-cache.outputs.dir }} | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
# Install runtime dependencies | |
- name: Upgrade pip | |
run: pip install --upgrade pip | |
- name: Install nox | |
run: pip install nox | |
- name: Render entire site | |
run: nox -s publish | |
# Publish! | |
- name: Deploy to GitHub Pages | |
if: github.event_name == 'push' || github.event_name == 'schedule' | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: public/ | |
# Upload for introspection, useful for pull requests and debugging | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: generated-site | |
path: public/ |