2022-05-08 21:55:20 +00:00
|
|
|
name: Doxygen GitHub Pages Deploy Action
|
|
|
|
|
|
|
|
on:
|
2022-05-08 21:58:33 +00:00
|
|
|
push:
|
2022-05-08 22:26:41 +00:00
|
|
|
branches: [ main ]
|
2022-05-08 22:17:47 +00:00
|
|
|
repository_dispatch:
|
2022-05-08 22:26:41 +00:00
|
|
|
types: [ CodePush ]
|
2022-05-08 21:55:20 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
2022-05-08 22:00:30 +00:00
|
|
|
repository: saturneric/GpgFrontend
|
2022-05-08 21:55:20 +00:00
|
|
|
submodules: recursive
|
2022-05-08 22:34:07 +00:00
|
|
|
ref: ${{ github.event.client_payload.message.branch || 'main' }}
|
2022-05-08 21:55:20 +00:00
|
|
|
path: GpgFrontend
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
ref: develop
|
|
|
|
path: GpgFrontend-Doxygen
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
persist-credentials: false
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Install Doxygen Dependency
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get -y install doxygen graphviz
|
|
|
|
sudo apt-get -y install git gpg
|
|
|
|
|
|
|
|
- name: Generate New Document
|
|
|
|
run: |
|
|
|
|
cd ${{github.workspace}}/GpgFrontend/
|
|
|
|
doxygen Doxyfile
|
|
|
|
|
|
|
|
- name: Copy Document
|
|
|
|
run: |
|
|
|
|
cd ${{github.workspace}}
|
|
|
|
rm -rf ${{github.workspace}}/GpgFrontend-Doxygen/docs
|
|
|
|
cp -rf ${{github.workspace}}/GpgFrontend/docs ${{github.workspace}}/GpgFrontend-Doxygen/docs
|
|
|
|
|
|
|
|
- name: Commit Document
|
|
|
|
run: |
|
|
|
|
cd ${{github.workspace}}/GpgFrontend-Doxygen/
|
|
|
|
git config --local user.email "$(git log --format='%ae' HEAD^!)"
|
|
|
|
git config --local user.name "$(git log --format='%an' HEAD^!)"
|
|
|
|
git add .
|
2022-05-08 22:34:07 +00:00
|
|
|
git commit -m "Update Doxygen ref ${{ github.event.client_payload.message.branch || 'main' }} on $(date '+%Y-%m-%d %H:%M:%S')"
|
2022-05-08 21:55:20 +00:00
|
|
|
git config --global --add safe.directory /github/workspace
|
|
|
|
|
|
|
|
- name: Push Document into Repo
|
|
|
|
uses: ad-m/github-push-action@master
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
directory: '${{github.workspace}}/GpgFrontend-Doxygen'
|
|
|
|
branch: develop
|