-
Notifications
You must be signed in to change notification settings - Fork 66
56 lines (48 loc) · 1.63 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
52
53
54
55
56
name: CI-doxygen-publish
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'master' }}
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-22.04
if: (github.event_name == 'pull_request' && github.event.pull_request.merged) || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: iotivity-lite
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.IOTIVITY_LITE_SSH_KEY }}
- name: doxygen_build_documentation
run: |
sudo apt-get update -y
sudo apt-get install doxygen
doxygen --version
cd ${{ github.workspace }}/iotivity-lite/tools
./build_doc.sh
- name: doxygen_copy-docs
run: |
cd ~/work
git clone [email protected]:iotivity/iotivity-lite-doxygen.git
cd iotivity-lite-doxygen
rm -rf docs
cp -r ${{ github.workspace }}/iotivity-lite/tools/html .
#Rename to "docs"
mv html docs
- name: doxygen_push-changes
run: |
cd ~/work/iotivity-lite-doxygen
git config --global user.name 'IoTivity Bot'
git config --global user.email '[email protected]'
git add .
git diff-index --quiet HEAD || git commit -m "Automatic publish from github.com/iotivity/iotivity-lite"
git push