-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (68 loc) · 1.94 KB
/
publish.yml
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
##################################
##################################
## Automatic Doxygen Deployment ##
##################################
##################################
name: Doxygen Action
##############################
# Start the job on push docs #
##############################
on:
pull_request:
branches: [ main ]
paths:
- 'docs/**'
push:
branches: [ main ]
paths:
- 'docs/**'
# schedule:
# - cron: 34 12 * * *
###############
# Set the Job #
###############
jobs:
build:
name: Doxygen Action
runs-on: ubuntu-latest
steps:
# Build Documentation
- uses: actions/checkout@v3
- name: Build documentation
uses: mattnotmitt/doxygen-action@edge
with:
doxyfile-path: "./Doxyfile-prj.cfg"
working-directory: "docs/"
# Deploy to gh-pages
- name: Deploy documentation
id : deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/html
# Log current time
- name: Log current time
if: ${{ always() }}
run: echo "TIME=$(date +"%Y.%m.%d %H:%M")" >> $GITHUB_ENV
# If success, update badge to green
- name: Update badge to green
if: ${{ success() && github.event_name != 'pull_request' }}
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: ${{ secrets.GIST_DOXYGEN }}
filename: doxygen_badge.json
label: Doxygen
message: passing @ ${{ env.TIME }}
color: green
# If fail, update badge to red
- name: Update badge to red
if: ${{ failure() && github.event_name == 'pull_request' }}
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: ${{ secrets.GIST_DOXYGEN }}
filename: doxygen_badge.json
label: Doxygen
message: failing @ ${{ env.TIME }}
color: red