Skip to content

Correctly check out the cpp-docs branch #98

Correctly check out the cpp-docs branch

Correctly check out the cpp-docs branch #98

Workflow file for this run

name: docs
on:
push:
paths:
- src/**
- include/**
- .github/workflows/doxygen.yml
branches: [ "main" ]
pull_request:
paths:
- src/**
- include/**
- .github/workflows/doxygen.yml
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Packages
run: sudo apt-get install -y doxygen graphviz
- name: Generate
run: doxygen ./Doxyfile
- name: Publish
env:
CI_COMMIT_MESSAGE: Auto-generate doxygen documentation
CI_COMMIT_AUTHOR: update-docs-ci
# only commit and push changes on the main branch after the mr has been pushed.
if: github.event_name == 'push'
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "emproof-com@users.noreply.github.com"
git fetch origin cpp-docs
git switch cpp-docs
git add docs
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push