File: docs.yml

package info (click to toggle)
debsbom 0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,248 kB
  • sloc: python: 5,965; makefile: 31
file content (74 lines) | stat: -rw-r--r-- 1,544 bytes parent folder | download
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
# Copyright (C) 2025 Siemens
#
# SPDX-License-Identifier: MIT

name: Docs

on:
  push:
    branches:
    - main
  pull_request:

jobs:
  docs:
    name: Build Docs
    runs-on: ubuntu-24.04
    steps:
      - name: Check out the repo
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: 3.13

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install .[dev]

      - name: Build HTML docs
        run: |
          cd docs
          make html

      # build-test only to catch doc building issues
      - name: Build manpages
        run: |
          cd docs
          make man

      - name: Upload HTML docs
        if: github.ref == 'refs/heads/main'
        uses: actions/upload-artifact@v4
        with:
          name: docs-html
          path: docs/build/html

  publish:
    name: Publish Docs
    runs-on: ubuntu-24.04
    if: github.ref == 'refs/heads/main'
    needs:
      - docs
    permissions:
      pages: write
      id-token: write
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - name: Download HTML docs
        uses: actions/download-artifact@v4
        with:
          name: docs-html
          path: docs-html

      - name: Upload pages artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: docs-html

      - name: Deploy to GitHub Pages
        uses: actions/deploy-pages@v4