-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADDED] GitHub action to update docs (#720)
* [ADDED] GitHub action to update docs * Removed the caching since I couldn't make it work/test * PR feedback: rm html files before running doxygen
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Update Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
update-docs: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write # to push branches | ||
pull-requests: write # to create pull requests | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Doxygen | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y doxygen | ||
- name: Generate Documentation | ||
id: update | ||
run: | | ||
cd doc | ||
rm -rf ./html/* | ||
doxygen DoxyFile.NATS.Client | ||
git diff --quiet || echo "CHANGES=true" >> $GITHUB_OUTPUT | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v6 | ||
if: steps.update.outputs.CHANGES == 'true' | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: Update documentation | ||
branch: update-docs | ||
title: Auto-generated documentation update | ||
body: Documentation changes were detected. Please review and merge. | ||
labels: documentation | ||
base: main | ||
branch-suffix: timestamp | ||
delete-branch: true |