-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (45 loc) · 1.23 KB
/
build_deploy_docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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:
build-docs:
runs-on: ubuntu-22.04
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
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