-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (44 loc) · 1.43 KB
/
doxygen-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
name: doxygen-publish
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
types: [closed]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
doxygen-publish:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged }}
steps:
- uses: actions/checkout@v3
with:
path: KNX-IOT-STACK
- uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.KNX_IOT_STACK_SSH_KEY }}
- name: doxygen_build_documentation
run: |
sudo apt-get update -y
sudo apt-get install doxygen
doxygen --version
cd ${{ github.workspace }}/KNX-IOT-STACK/tools
./build_doc.sh
- name: doxygen_copy-docs
run: |
cd ~/work
git clone git@github.com:KNX-IOT/KNX-IOT-STACK-doxygen.git
cd KNX-IOT-STACK-doxygen
rm -rf docs
cp -r ${{ github.workspace }}/KNX-IOT-STACK/tools/html .
#Rename to "docs"
mv html docs
- name: doxygen_push-changes
run: |
cd ~/work//KNX-IOT-STACK-doxygen
git config --global user.name 'KNX Bot'
git config --global user.email 'github@knx.com'
git add .
git diff-index --quiet HEAD || git commit -m "Automatic publish from github.com/KNX-IOT/KNX-IOT-STACK"
git push