File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : " Build & Deploy Doxygen Docs"
2+
3+ on :
4+ pull_request :
5+ types : [closed]
6+ branches :
7+ - develop
8+
9+ jobs :
10+ build-and-deploy :
11+ if : github.event.pull_request.merged == true
12+ runs-on : ubuntu-latest
13+
14+ permissions :
15+ contents : write
16+ pages : write
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v3
21+ with :
22+ fetch-depth : 0
23+
24+ - name : Install Doxygen
25+ run : sudo apt-get update && sudo apt-get install -y doxygen graphviz
26+
27+ - name : Generate Doxygen HTML
28+ run : doxygen ./Doxyfile
29+
30+ - name : Setup Git for Deployment
31+ run : |
32+ git config user.name "github-actions[bot]"
33+ git config user.email "github-actions[bot]@users.noreply.github.com"
34+
35+ - name : Clone docs branch
36+ run : |
37+ git clone --branch docs https://x-access-token:${{ secrets.USER_SECRET }}@github.com/${{ github.repository }} docs-out
38+
39+ - name : Copy generated HTML
40+ run : |
41+ rm -rf docs-out/*
42+ cp -R docs/html/* docs-out/
43+
44+ - name : Commit & Push
45+ working-directory : docs-out
46+ run : |
47+ git add .
48+ git commit -m "Regenerate Doxygen docs from ${{ github.sha }}" || echo "No changes to commit"
49+ git push
You can’t perform that action at this time.
0 commit comments