-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (48 loc) · 1.71 KB
/
sphinx-build.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
47
48
49
50
51
52
53
54
# Syntax reference for this file:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: sphinx
on: [push]
# https://gist.github.com/c-bata/ed5e7b7f8015502ee5092a3e77937c99
jobs:
build-and-delpoy:
name: Build
runs-on: ubuntu-latest
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v2
# https://github.com/marketplace/actions/setup-python
# ^-- This gives info on matrix testing.
- name: Install Python
uses: actions/setup-python@v1
with:
python-version: 3.9
# I don't know where the "run" thing is documented.
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -r docsource/sphinxrequires.txt
- name: Build Sphinx docs
if: success()
run: |
pip install .
python3 -c "import pychee; print('pychee.__file__')"
sphinx-build -M html docsource docs
# https://github.com/marketplace/actions/github-pages
#- if: success()
# uses: crazy-max/ghaction-github-pages@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# target_branch: gh-pages
# build_dir: _build/html/
# https://github.com/peaceiris/actions-gh-pages
- name: Deploy
if: success()
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/html/
# This action probably does everything for you:
# https://github.com/marketplace/actions/sphinx-build