Merge pull request #610 from novelrt/misc/licence-update-2025 #153
This file contains hidden or 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 | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
Build_and_Publish_Documentation: | |
name: Build and Publish Documentation | |
runs-on: ubuntu-latest | |
container: | |
image: novelrt/novelrt-build:latest | |
steps: | |
- name: Allow Repository Changes | |
run: git config --global --add safe.directory $GITHUB_WORKSPACE | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Create documentation branch | |
run: git checkout -b gh-pages | |
- name: Prepare Secrets | |
run: echo "${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_WORKSPACE/secret.txt | |
#Mandatory step it appears otherwise pushing the commit will fail | |
- name: Configure Git | |
run: | | |
gh auth login --with-token < $GITHUB_WORKSPACE/secret.txt | |
git config user.name "Novel-chan" | |
git config user.email "[email protected]" | |
- name: Generate Documentation | |
run: | | |
cmake -S . -B build -DCMAKE_BUILD_TYPE="Release" -DDOXYGEN_OUTPUT_DIRECTORY=$GITHUB_WORKSPACE/docs -DNOVELRT_BUILD_DOCUMENTATION=ON | |
cmake --build build --config Release --target Doxygen | |
- name: Commit Documentation Updates | |
if: ${{ success() }} | |
run: | | |
git add $GITHUB_WORKSPACE/docs/* | |
git commit -m "Updated documentation - $GITHUB_SHA from main" | |
git push origin gh-pages --force |