Skip to content

Commit a755e55

Browse files
feat/add GitHub Actions for auto-Doxygen on merge (#113)
* feat/add GitHub Actions for auto-Doxygen on merge * Update doxygen.yml --------- Co-authored-by: Pooranjoy Bhattacharya <pooranjoyb2016@gmail.com>
1 parent 9f25a0c commit a755e55

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/doxygen.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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

0 commit comments

Comments
 (0)