-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (45 loc) · 1.92 KB
/
update-masscalculator-docker-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
47
48
49
50
51
52
53
54
55
56
name: Update MassCalculator Docker Docs
on:
repository_dispatch:
types: [masscalculator-docker-pr-merged]
jobs:
update-masscalculator-docker-docs:
runs-on: ubuntu-latest
strategy:
matrix:
repository: ['MassCalculator/masscalculator-docker']
ref: ['devel', 'master']
steps:
- name: Checkout documentation hosting repository
uses: "actions/checkout@v3"
with:
repository: "MassCalculator/masscalculator.github.io"
path: "masscalculator.github.io"
- name: Checkout documentation repository
uses: actions/checkout@v3
with:
repository: ${{matrix.repository}}
path: "${{matrix.repository}}"
ref: ${{matrix.ref}}
- name: Environment setup
run: sudo ${{matrix.repository}}/tools/installers/essentials.sh
- name: Configure CMake
run: cmake -S ${{matrix.repository}} -B ${{matrix.repository}}/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCS=ON
- name: Build documentation
run: cmake --build ${{matrix.repository}}/build -t Doxygen --config Release
- name: Remove old HTML
run: rm -rf masscalculator.github.io/docs/masscalculator-docker/${{matrix.ref}}/html
- name: Copy new HTML
run: cp -r ${{matrix.repository}}/build/docs/doxygen/html masscalculator.github.io/docs/masscalculator-docker/${{matrix.ref}}/html
- name: Pull changes from remote repository
run: git -C masscalculator.github.io pull origin master
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Update documentation for masscalculator-docker"
commit_user_name: "Mergim Halimi"
commit_user_email: "[email protected]"
branch: master
repository: "masscalculator.github.io"
env:
GITHUB_TOKEN: ${{secrets.MASSCALCULATOR_SECRET}}