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