-
-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (62 loc) · 1.88 KB
/
docs.yml
File metadata and controls
75 lines (62 loc) · 1.88 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
# Copyright (c) 2024, Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
name: Documentation
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
release:
types: [published]
workflow_dispatch:
env:
DOXYGEN_VERSION: 1.9.6
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install dependencies
run: |
wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
pip install -r doc/requirements.txt
- name: Build
run: |
cd doc
doxygen
SPHINXOPTS="-W" make html
mkdir deploy
mv _build_doxygen/html deploy/doxygen
mv _build_sphinx/html/* deploy
- name: Setup pages
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: actions/configure-pages@v6
- name: Upload pages artifact
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v4
with:
path: doc/deploy
- name: Upload artifacts
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v6
with:
path: doc/deploy
deploy:
runs-on: ubuntu-22.04
needs: build
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4