forked from GRTLCollaboration/GRChombo
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (55 loc) · 2.09 KB
/
build-doxygen.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build and update Doxygen documentation
on:
push:
branches:
- main
jobs:
doxygen:
name: Build Doxygen documentation
if: github.repository == 'grchombo/grchombo'
runs-on: ubuntu-latest
steps:
- name: Checkout GRChombo
uses: actions/checkout@v4
with:
path: GRChombo
- name: Build Doxygen documentation
uses: mattnotmitt/doxygen-action@v1
with:
working-directory: 'GRChombo/Doxygen'
doxyfile-path: 'doxygen_config'
- name: Fix local URLs
run: |
echo "grchombo_shortsha=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
sudo chown -R $USER: .
sed -i "s|/github/workspace/GRChombo|https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/${GITHUB_SHA}|g" *.html
working-directory: 'GRChombo/Doxygen/html'
- name: Checkout GRChombo.github.io
uses: actions/checkout@v4
with:
repository: GRChombo/GRChombo.github.io
path: GRChombo.github.io
- name: Replace old Doxygen documentation with newly generated ones
run: |
rm -rf html
cp -r $GITHUB_WORKSPACE/GRChombo/Doxygen/html .
working-directory: ${{ github.workspace }}/GRChombo.github.io/Doxygen
- name: Assign Doxygen PR reviewer
run: |
if [[ $GITHUB_ACTOR == "KAClough" ]]; then
PR_REVIEWER="SamuelBrady"
else
PR_REVIEWER="KAClough"
fi
echo "pr_reviewer=${PR_REVIEWER}" >> $GITHUB_ENV
- name: Make pull request in GRChombo.github.io
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.REPO_GITHUB_TOKEN }}
path: 'GRChombo.github.io'
commit-message: 'Update Doxygen documentation from commit ${{ env.grchombo_shortsha }}'
branch: 'enhancement/update_doxygen'
title: 'Update Doxygen documentation'
body: |
Automated pull request to update Doxygen documentation to that generated from GRChombo at commit [`${{ env.grchombo_shortsha }}`](https://github.com/GRChombo/GRChombo/commit/${{ env.grchombo_shortsha }}).
reviewers: ${{ env.pr_reviewer }}