Skip to content

Instantly share code, notes, and snippets.

@adriangb
Last active February 21, 2021 20:00
Show Gist options
  • Save adriangb/1d683795615b3852606009b3987d4d8a to your computer and use it in GitHub Desktop.
Save adriangb/1d683795615b3852606009b3987d4d8a to your computer and use it in GitHub Desktop.
name: Build Docs
on:
push:
branches:
- main
- develop
pull_request:
release:
types:
- published
jobs:
build:
name: Build Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Build
run: |
pip install sphinx
sphinx-build -b html -j 2 docs/ docs/_build/${{ github.ref }}
find ./docs/_build -type d -name '.[^.]*' -prune -exec rm -rf {} +
- name: Save ref
run: echo "${{ github.ref }}" >> docs/_build/ref.txt
- name: Save docs artifact
uses: actions/upload-artifact@v2
with:
name: docs
path: docs/_build/*
retention-days: 1 # should only be needed for a few minutes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment