-
Notifications
You must be signed in to change notification settings - Fork 21
68 lines (61 loc) · 1.74 KB
/
sphinx.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
name: Build Sphinx Docs
on:
push:
branches: [main]
pull_request:
# If another web build starts for the same branch, cancel the previous build. This
# protects us from two build trying to upload at the same time and clobbering each
# other.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pages: write
id-token: write
pull-requests: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org/ | python -
- name: Add Poetry to PATH
run: echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install
- name: Build HTML docs
run: poetry run make docs-ci
- name: Upload HTML docs
uses: actions/upload-artifact@v3
with:
name: insider-threat-ttp-kb-docs-html
path: docs/_build/dirhtml/
# TODO Uncomment before publishing repository.
github_pages:
# This job only runs when committing or merging to main branch.
if: github.ref_name == 'main'
needs: docs
runs-on: ubuntu-latest
environment:
name: github-pages
url: $\{\{ steps.deployment.outputs.page_url \}\}
steps:
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Download HTML docs
uses: actions/download-artifact@v3
with:
name: insider-threat-ttp-kb-docs-html
path: docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1