-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (56 loc) · 2.52 KB
/
update-masscalculator-cli-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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Update MassCalculator Cli Docs
on:
repository_dispatch:
types: [masscalculator-cli-pr-merged]
jobs:
update-masscalculator-cli-docs:
runs-on: ubuntu-latest
strategy:
matrix:
repository: ['MassCalculator/masscalculator-cli']
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: Conan Recipe Checkout [Temporary]
uses: actions/checkout@v3
with:
repository: MassCalculator/conan-masscalculator-core
path: conan-masscalculator-core
- name: Conan Profile Detect [Temporary]
run: conan profile detect
- name: Conan Config [Temporary]
run: echo -e "tools.system.package_manager:mode = install\ntools.system.package_manager:sudo = True\n" > ~/.conan2/global.conf
- name: Local Conan Recipe Build [Temporary]
run: conan create conan-masscalculator-core/all/ --version 0.2.0 --user masscalculator --channel stable --build missing
- 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-cli/${{matrix.ref}}/html
- name: Copy new HTML
run: cp -r ${{matrix.repository}}/build/docs/doxygen/html masscalculator.github.io/docs/masscalculator-cli/${{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-cli"
commit_user_name: "Mergim Halimi"
commit_user_email: "[email protected]"
branch: master
repository: "masscalculator.github.io"
env:
GITHUB_TOKEN: ${{secrets.MASSCALCULATOR_SECRET}}