Debian Codegraph @

.github/workflows/docs.yml

raw
1 # Copyright (C) 2025 Siemens
2 #
3 # SPDX-License-Identifier: MIT
4
5 name: Docs
6
7 on:
8 push:
9 branches:
10 - main
11 pull_request:
12
13 jobs:
14 docs:
15 name: Build Docs
16 runs-on: ubuntu-24.04
17 steps:
18 - name: Check out the repo
19 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
20
21 - name: Set up Python
22 uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
23 with:
24 python-version: 3.14
25
26 - name: Install dependencies
27 run: |
28 python -m pip install --upgrade pip
29 pip install .[dev]
30
31 - name: Build HTML docs
32 run: |
33 cd docs
34 make html
35
36 # build-test only to catch doc building issues
37 - name: Build manpages
38 run: |
39 cd docs
40 make man
41
42 - name: Upload HTML docs
43 if: github.ref == 'refs/heads/main'
44 uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
45 with:
46 name: docs-html
47 path: docs/build/html
48
49 publish:
50 name: Publish Docs
51 runs-on: ubuntu-24.04
52 if: github.ref == 'refs/heads/main'
53 needs:
54 - docs
55 permissions:
56 pages: write
57 id-token: write
58 environment:
59 name: github-pages
60 url: ${{ steps.deployment.outputs.page_url }}
61 steps:
62 - name: Download HTML docs
63 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
64 with:
65 name: docs-html
66 path: docs-html
67
68 - name: Upload pages artifact
69 uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5
70 with:
71 path: docs-html
72
73 - name: Deploy to GitHub Pages
74 uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5