-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (50 loc) · 1.52 KB
/
doxygen.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
name: Deploy Documentation to GitHub Pages
permissions:
contents: write
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Setup directories
run: |
mkdir main
mkdir gh-pages
- name: Checkout main branch
uses: actions/checkout@v2
with:
path: 'main'
- name: Install Doxygen
run: sudo apt-get install doxygen
- name: Generate Documentation with Doxygen
run: |
cd main/doxygen
doxygen Doxyfile
cd ../..
- name: Checkout gh-pages branch
uses: actions/checkout@v2
with:
ref: 'gh-pages'
path: 'gh-pages'
fetch-depth: 0 # Important to fetch all history for branch comparison
- name: Clear gh-pages branch content
run: |
cd gh-pages
git rm -rf . # Clear current contents safely
cd ..
- name: Copy Documentation to gh-pages directory
run: |
cp -r main/doxygen/html/* gh-pages/
- name: Deploy to GitHub Pages
run: |
cd gh-pages
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
git add .
git commit -m "Deploy updated documentation" || echo "No changes to commit"
git push --force https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/ropg/OOKwiz.git gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}