-
Notifications
You must be signed in to change notification settings - Fork 274
135 lines (111 loc) · 3.37 KB
/
Copy pathdocs.yml
File metadata and controls
135 lines (111 loc) · 3.37 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: documentation
on:
push:
branches: [ devel ]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Update sources
run: sudo apt-get update
- name: Install doc dependencies
run: sudo apt-get install -y doxygen
# Those are necessary if pip doesn't find the wheels
# and decides to rebuild from source
- name: Install doc extra dependencies
run: sudo apt-get install -y libjpeg-dev libxml2-dev libxslt1-dev
- name: Install manif dependencies
run: sudo apt-get install -y libeigen3-dev
- name: Build Sphinx venv
working-directory: "docs"
run: |
set -ex
make install || ( cat .sphinx/venv/pip_install.log && exit 1 )
- name: Build documentation
working-directory: docs
run: |
make html || ( echo "Whole bunch of things to fix." )
if ! [ -d _build ]; then exit 1; fi
- name: Prevent Jekyll from building the gh-pages
working-directory: docs
run: touch _build/.nojekyll
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: doc
path: |
docs/_build
docs/_build/.nojekyll
!docs/_build/doxyxml
test:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Update sources
run: sudo apt-get update
- name: Install doc dependencies
run: sudo apt-get install -y doxygen
# Those are necessary if pip doesn't find the wheels
# and decides to rebuild from source
- name: Install doc extra dependencies
run: sudo apt-get install -y libjpeg-dev libxml2-dev libxslt1-dev
- name: Install manif dependencies
run: sudo apt-get install -y libeigen3-dev
- name: linkcheck
working-directory: docs
run: make linkcheck
- uses: DavidAnson/markdownlint-cli2-action@v16
with:
config: "docs/.sphinx/.markdownlint.json"
# documentation-checks:
# uses: canonical/documentation-workflows/.github/workflows/documentation-checks.yaml@main
# with:
# working-directory: "docs"
# fetch-depth: 0
# install-target: "gh-ci-install"
deploy:
needs: [test]
runs-on: ubuntu-latest
permissions:
contents: write
# todo: deploy if new tag/release
if: |
github.repository == 'artivis/manif' &&
github.event_name == 'push' &&
github.ref == 'refs/heads/devel'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: doc
path: docs_build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs_build