-
Notifications
You must be signed in to change notification settings - Fork 88
75 lines (63 loc) · 2.04 KB
/
build-publish-docs.yaml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#
name: Build and publish documentation
on:
pull_request:
paths:
- "docs/**"
- "dask-gateway/**"
- "dask-gateway-server/**"
- ".github/workflows/build-publish-docs.yaml"
push:
paths:
- "docs/**"
- "dask-gateway/**"
- "dask-gateway-server/**"
- ".github/workflows/build-publish-docs.yaml"
branches: ["main"]
tags: ["**"]
workflow_dispatch:
env:
commit_msg: ${{ github.event.head_commit.message }}
jobs:
build-and-publish-docs:
name: Build and publish documentation
runs-on: ubuntu-22.04
# permissions requested for secrets.github_token in order to push to the
# gh-pages branch, available for push and workflow_dispatch triggers.
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Python docs requirements
run: |
DASK_GATEWAY_SERVER__NO_PROXY=true pip install -r docs/requirements.txt
- name: Build docs (make html)
run: |
cd docs
make html SPHINXOPTS='--color -W --keep-going'
- name: Push built docs to gh-pages branch
uses: JamesIves/github-pages-deploy-action@releases/v4
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
branch: gh-pages
folder: docs/_build/html/
linkcheck-docs:
name: Test links in docs
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Python docs requirements
run: |
DASK_GATEWAY_SERVER__NO_PROXY=true pip install -r docs/requirements.txt
- name: Linkcheck docs (make linkcheck)
run: |
cd docs
make linkcheck SPHINXOPTS='--color -W --keep-going'