-
Notifications
You must be signed in to change notification settings - Fork 370
58 lines (49 loc) · 1.49 KB
/
build-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
47
48
49
50
51
52
53
54
55
56
57
58
name: Build docs
on:
pull_request:
branches:
- main
- release-*
paths:
- mkdocs.yml
- embedded-bins/Makefile.variables
- docs/**
jobs:
build:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: Checkout k0s
uses: actions/checkout@v3
- name: Prepare build environment
run: .github/workflows/prepare-build-env.sh
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: pip
cache-dependency-path: docs/requirements.txt
- name: Install dependencies
run: |
# https://github.com/actions/setup-python/issues/521
# https://github.com/actions/python-versions/blob/3.10.9-3636985951/installers/nix-setup-template.sh#L53
pip install --disable-pip-version-check -r docs/requirements_pip.txt
pip --version
pip install --disable-pip-version-check -r docs/requirements.txt
- name: Generate docs
env:
GH_TOKEN: ${{ github.token }}
run: make -C docs docs
- name: Upload site/
uses: actions/upload-artifact@v3
with:
name: site
path: site/
dev-container:
name: Build docs dev container
runs-on: ubuntu-latest
steps:
- name: Checkout k0s
uses: actions/checkout@v3
- name: Build docs dev container
run: make -C docs .docker-image.serve-dev.stamp