Skip to content

Commit b9a3a7f

Browse files
committed
Rework doxygen CI
1 parent ff335fc commit b9a3a7f

2 files changed

Lines changed: 72 additions & 28 deletions

File tree

.github/workflows/build.yml

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build
1+
name: "build"
22

33
on:
44
push:
@@ -16,8 +16,14 @@ on:
1616
schedule:
1717
- cron: '0 0 * * 1'
1818

19+
permissions:
20+
contents: read
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
24+
1925
jobs:
20-
build:
26+
main:
2127
strategy:
2228
matrix:
2329
macos: [latest, 15, 14, 13]
@@ -31,6 +37,10 @@ jobs:
3137
with:
3238
fetch-depth: 0
3339

40+
- name: Install doxygen
41+
run: |
42+
brew install --formula doxygen graphviz
43+
3444
- name: Release build
3545
run: make release_build
3646

@@ -45,29 +55,3 @@ jobs:
4555

4656
- name: Install
4757
run: sudo make install
48-
49-
doxygen:
50-
runs-on: macos-latest
51-
if: github.event_name != 'pull_request'
52-
53-
steps:
54-
- name: Install tools
55-
run: brew install --formula doxygen graphviz
56-
57-
- name: Checkout
58-
uses: actions/checkout@v4
59-
with:
60-
fetch-depth: 0
61-
62-
- name: Build
63-
run: make debug_build
64-
65-
- name: Prepare
66-
run: touch html/.nojekyll
67-
68-
- name: Deploy
69-
uses: JamesIves/github-pages-deploy-action@v4.6.8
70-
with:
71-
branch: doxygen
72-
folder: html
73-
single-commit: true

.github/workflows/doxygen.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: "doxygen"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
15+
16+
jobs:
17+
build:
18+
outputs:
19+
page-url: ${{ steps.upload.outputs.page_url }}
20+
21+
runs-on: macos-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Install doxygen
29+
run: |
30+
brew install --formula doxygen graphviz
31+
32+
- name: Build code and html
33+
run: |
34+
make debug_build
35+
touch html/.nojekyll
36+
37+
- if: |
38+
github.repository_owner == 'gavv' && github.ref == 'refs/heads/main'
39+
name: Upload html
40+
id: upload
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: html/
44+
45+
deploy:
46+
if: |
47+
github.repository_owner == 'gavv' && github.ref == 'refs/heads/main'
48+
49+
needs: build
50+
environment:
51+
name: github-pages
52+
url: ${{ needs.build.outputs.page-url }}
53+
permissions:
54+
pages: write
55+
id-token: write
56+
57+
runs-on: macos-latest
58+
steps:
59+
- name: Deploy
60+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)