-
Notifications
You must be signed in to change notification settings - Fork 61
87 lines (68 loc) · 2.04 KB
/
doc.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Documentation
on:
push:
branches:
- master
- kvmi
- kvmi-v6
- kvmi-v7
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
kvmi_ver: [master, kvmi, kvmi-v6, kvmi-v7]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.kvmi_ver }}
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.10"
- name: Install dependencies 📦
run: pip install -r docs/requirements.txt
- name: Build documentation 🔨
run: sphinx-build -M html docs "docs/_build/${{ matrix.kvmi_ver }}"
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.kvmi_ver }}
path: "docs/_build/${{ matrix.kvmi_ver }}/html"
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
# the deploy action below depends on a checkout of the repo
# otherwise it fails trying to remote the 'origin' remote
# https://github.com/JamesIves/github-pages-deploy-action/issues/335
- uses: actions/checkout@v4
# download artifacts
- uses: actions/download-artifact@v4
with:
name: master
path: _web/master
- uses: actions/download-artifact@v4
with:
name: kvmi
path: _web/kvmi
- uses: actions/download-artifact@v4
with:
name: kvmi-v6
path: _web/kvmi-v6
- uses: actions/download-artifact@v4
with:
name: kvmi-v7
path: _web/kvmi-v7
# add .nojekyll to the root so that github won't 404 on content added to dirs
# that start with an underscore (_), such as our "_content" dir..
- name: Add nojekyll for Github Pages
run: touch _web/.nojekyll
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
# note: FOLDER doesn't care about the job's working directory
folder: _web
single-commit: true