--- /dev/null
+---
+name: doxygen
+
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ Doxygen:
+ runs-on: ubuntu-18.04
+ strategy:
+ fail-fast: false
+
+ steps:
+ - uses: actions/checkout@v2.0.0
+ - name: Install Depends
+ run: |
+ sudo apt install doxygen
+
+ - name: Generate Doxygen
+ shell: bash
+ run: |
+ mkdir build
+ cd build
+ cmake -DEVENT__DOXYGEN=ON ..
+ make doxygen
+
+ - name: Deploy Documentation
+ env:
+ LIBEVENT_DEPLOY_PRI: ${{ secrets.LIBEVENT_DEPLOY_PRI }}
+ COMMIT_ID: ${{ github.sha }}
+ run: |
+ [[ -n $LIBEVENT_DEPLOY_PRI ]] || exit 0
+
+ mkdir -p ~/.ssh
+ echo "$LIBEVENT_DEPLOY_PRI" > ~/.ssh/id_rsa
+ chmod 600 ~/.ssh/id_rsa
+ ssh-keyscan github.com >> ~/.ssh/known_hosts
+
+ user_name="${{ github.event.head_commit.author.name }}"
+ user_email="${{ github.event.head_commit.author.email }}"
+ short_commit_id="${COMMIT_ID:0:7}"
+ owner_name="${{ github.event.repository.owner.name }}"
+
+ cd ./build/doxygen/html
+ git init
+ git config --local user.name $user_name
+ git config --local user.email $user_email
+ git add -f .
+ git commit -m "Update documentation (libevent/libevent@$short_commit_id)"
+ git push -f git@github.com:$owner_name/doc master
+
+ - uses: actions/upload-artifact@v1
+ if: failure()
+ with:
+ name: doxygen-build
+ path: build