masscalculator-gui-pr-merged #4
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
name: Update MassCalculator Gui Docs | |
on: | |
repository_dispatch: | |
types: [masscalculator-gui-pr-merged] | |
jobs: | |
update-masscalculator-gui-docs: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
repository: ['MassCalculator/masscalculator-gui'] | |
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-gui/${{matrix.ref}}/html | |
- name: Copy new HTML | |
run: cp -r ${{matrix.repository}}/build/docs/doxygen/html masscalculator.github.io/docs/masscalculator-gui/${{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-gui" | |
commit_user_name: "Mergim Halimi" | |
commit_user_email: "[email protected]" | |
branch: master | |
repository: "masscalculator.github.io" | |
env: | |
GITHUB_TOKEN: ${{secrets.MASSCALCULATOR_SECRET}} |