Skip to content

Commit

Permalink
Add github workflow for building and deploying documentation site
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMcCormick committed Sep 17, 2024
1 parent 765a365 commit e25d72b
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build and upload documentation

"on":
merge_group: {}
pull_request: {}
push:
branches-ignore:
# These should always correspond to pull requests, so ignore them for
# the push trigger and let them be triggered by the pull_request
# trigger, avoiding running the workflow twice. This is a minor
# optimization so there's no need to ensure this is comprehensive.
- "dependabot/**"
- "gh-readonly-queue/**"
- "renovate/**"
- "tickets/**"
- "u/**"
release:
types: [published]

jobs:
docs:

runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history for setuptools_scm

- name: Install Graphviz
run: sudo apt-get install graphviz

- name: Run tox
uses: lsst-sqre/run-tox@v1
with:
python-version: "3.11"
tox-envs: "docs"
# Add docs-linkcheck when the docs and PyPI package are published
# tox-envs: "docs,docs-linkcheck"
tox-plugins: tox-uv

# Only attempt documentation uploads for tagged releases and pull
# requests from ticket branches in the same repository. This avoids
# version clutter in the docs and failures when a PR doesn't have access
# to secrets.
- name: Upload to LSST the Docs
uses: lsst-sqre/ltd-upload@v1
with:
project: "consdb"
dir: "doc/_build/html"
username: ${{ secrets.LTD_USERNAME }}
password: ${{ secrets.LTD_PASSWORD }}
if: >
github.event_name != 'merge_group'
&& (github.event_name != 'pull_request'
|| startsWith(github.head_ref, 'tickets/'))

0 comments on commit e25d72b

Please sign in to comment.