-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (39 loc) · 1.46 KB
/
build-docs-with-actions.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
# We want to make sure that a user is able to build the docs locally before pushing to RTD.
# Additionally, this helps us to better determine if there is an issue with the RTD build
# versus an issue with sphinx and mkdocs itself.
name: Build Docs with Actions
on:
push:
branches:
- '**'
jobs:
build-install:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
# we only use 3.9 for RTD at this time.
python-version: ["3.9"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Check python3 == python${{ matrix.python-version }}
run: |
installed_python=$(python3 --version)
echo "Installed Python: $installed_python"
if [[ "$installed_python" != *"${{ matrix.python-version }}"* ]]; then
echo "Python version mismatch. Expected: ${{ matrix.python-version }}, but got: $installed_python"
exit 1
fi
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install Dependencies
run: |
poetry install --with dev
- name: Build Docs
run: make docs