-
Notifications
You must be signed in to change notification settings - Fork 138
46 lines (39 loc) · 1.37 KB
/
update-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Update Docs
on:
push:
branches:
- main
- release_*
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
echo "SOURCE_TITLE=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
echo "SOURCE_SHA=$(git log -1 --pretty=%h)" >> $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: "[skip ci] Update docs: ${{ steps.update.outputs.SOURCE_SHA }}: ${{ steps.update.outputs.SOURCE_TITLE }}"
branch: update-docs-${{ github.ref_name }}
title: Auto-generated documentation update for ${{ github.ref_name }}
body: Documentation changes were detected. Please review and merge.
labels: documentation
delete-branch: true