File: publish-doc.yml

package info (click to toggle)
wlmaker 0.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 7,696 kB
  • sloc: ansic: 58,587; xml: 1,424; python: 1,400; cpp: 253; yacc: 118; sh: 73; lex: 70; makefile: 8
file content (89 lines) | stat: -rw-r--r-- 2,494 bytes parent folder | download | duplicates (2)
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
name: Generate and publish Documentation

on:
  # The principal run is on pushes targeting the default branch.
  push:
    branches: [ "main" ]
  # We also run on pull requests towards main, to catch issues with generating
  # the documentation before they're merged.
  pull_request:
    branches: [ "main"  ]

  # Allows you to run this workflow manually from the Actions tab.
  workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
  contents: read
  pages: write
  id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run
# in-progress and latest queued. However, do NOT cancel in-progress runs as we
# want to allow these production deployments to complete.
concurrency:
  group: "pages"
  cancel-in-progress: false

jobs:
  # Generate documentation, in a container.
  generate_doc:
    name: "Generate documentation"
    runs-on: ubuntu-latest
    container:
      image: debian:trixie

    steps:
      - name: Install package dependencies.
        run: |
          apt-get update
          apt-get install -y \
            bison \
            cmake \
            doxygen \
            flex \
            gcc \
            git \
            libcairo2-dev \
            libncurses-dev \
            libwlroots-0.18-dev \
            libxdg-basedir-dev \
            pkg-config \
            plantuml \
            wmaker

      - name: Checkout code, including git submodules.
        uses: actions/checkout@v3
        with:
          submodules: true

      - name: Configure wlmaker through CMake, with doxygen.
        run: |
          cmake -Dconfig_DOXYGEN_CRITICAL=ON -B build/

      - name: Build documentation.
        run: cmake --build build/ --target doc

      - name: Configure GitHub Pages.
        uses: actions/configure-pages@v5

      - name: Upload the generated documentation.
        uses: actions/upload-pages-artifact@v3
        with:
          # Upload entire repository
          path: 'build/doc/html/'

  # Deploys the uploaded documentation to GitHub Pages.
  deploy:
    name: "Deploy the generated documentation"
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: generate_doc
    # Skip deployment unless it's the "push" on "main".
    if: ${{ github.event_name == 'push' }}
    steps:
      - name: Deploy to GitHub Pages.
        id: deployment
        uses: actions/deploy-pages@v4