Merge pull request #776 from KNX-IOT/frank-eitt-fix #1475
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |