Update dependencies #50
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 and deploy docs | |
on: | |
push: | |
paths: | |
- .github/workflows/build_deploy_docs.yml | |
- docs/source/** | |
- src/**/*.py | |
pull_request: | |
paths: | |
- .github/workflows/build_deploy_docs.yml | |
- docs/source/** | |
- src/**/*.py | |
workflow_dispatch: | |
jobs: | |
configure: | |
runs-on: ubuntu-22.04 | |
outputs: | |
connector_release: ${{ steps.get_release.outputs.release }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# TODO: Whenever issues with "git describe" is resolved in | |
# actions/checkout, stop using fetch-depth: | |
#fetch-tags: true | |
fetch-depth: 0 | |
- id: get_release | |
name: Get connector (latest/previous) release | |
run: | | |
echo release="$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT | |
build-docs: | |
runs-on: ubuntu-22.04 | |
needs: configure | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10.12" | |
cache: pip | |
- name: Install connector dependencies | |
run: pip install -r src/requirements.txt | |
- name: Install doc. dependencies | |
run: pip install -r docs/requirements.txt | |
- name: Build sphinx HTML | |
env: | |
CONNECTOR_RELEASE: ${{ needs.configure.outputs.connector_release }} | |
run: sphinx-build -W -b html docs/source docs/build | |
- uses: actions/configure-pages@v5 | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs/build | |
deploy: | |
needs: [build-docs] | |
runs-on: ubuntu-22.04 | |
if: github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- id: deployment | |
uses: | |
actions/deploy-pages@v4 | |
# https://github.com/manics/action-sphinx-linkcheck |