-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.58 KB
/
doxygen.yaml
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
name: Generate and Publish Doxygen
on:
push:
branches:
- main # ou votre branche par défaut
pull_request:
branches:
- main # ou votre branche par défaut
jobs:
generate-docs:
runs-on: ubuntu-latest
if: github.actor != 'github-actions[bot]'
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: recursive # Si votre projet utilise des submodules
- name: Install Doxygen
run: sudo apt-get install doxygen
- name: Generate Doxygen Documentation
uses: mattnotmitt/doxygen-action@v1.9.5
with:
doxyfile-path: 'Doxyfile' # Assurez-vous que le Doxyfile est à la racine du projet
- name: Create /docs directory if not exists
run: mkdir -p ${{ github.workspace }}/docs
- name: Commit Documentation
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add docs/
git commit -m "Update documentation" -a || echo "No changes to commit"
- name: Push Changes
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
directory: ${{ github.workspace }}/docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' # Cette étape s'exécute uniquement sur la branche principale
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/html # Assurez-vous que c'est le répertoire de sortie configuré dans Doxyfile