-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (65 loc) · 1.94 KB
/
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#schema: https://github.com/softprops/github-actions-schemas/blob/master/workflow.json
name: "Documentation"
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
workflow_dispatch:
permissions:
id-token: write
actions: write
contents: read
packages: write
env:
ANNOY_COMPILER_ARGS: "-DANNOYLIB_MULTITHREADED_BUILD,-mno-avx512f"
jobs:
pre_job:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
paths_result: ${{ steps.skip_check.outputs.paths_result }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
if: ${{ !github.event.act }}
with:
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"
do_not_skip: '["workflow_dispatch"]'
paths_filter: |
main:
paths:
- 'src/pixelator/**'
- 'docs/**'
- '**/*.md'
- '**/*.rst'
docs:
name: "Build documentation"
runs-on: ubuntu-latest
needs:
- pre_job
if: needs.pre_job.outputs.should_skip == '{}' || !fromJSON(needs.pre_job.outputs.paths_result).main.should_skip
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python environment
uses: ./.github/actions/setup-python
with:
python-version: "3.11"
- name: Create dependencies file
run: |
pip install poetry
poetry export --output requirements.txt --without-hashes --no-interaction --no-ansi --with dev
pip install -r requirements.txt
- name: Sphinx Build
run: |
sphinx-build -b html docs docs/_build
- name: Archive documentation
uses: actions/upload-artifact@v3
with:
name: documentation
path: |
docs/_build