diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..2b1cc442 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,46 @@ +name: Documentation + +on: + push: + branches: + - 'master' + workflow_dispatch: + +jobs: + build_unix: + name: Build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: abbbi/github-actions-tune@v1 + + - name: Install packages + run: | + sudo add-apt-repository universe + sudo apt-get install -y -qq cmake doxygen + + - name: Generate build system + run: cmake -S . -B build -DENABLE_DOCS:BOOL=ON + + - name: Run Doxygen + run: make -C build docs + + - name: Copy docs + run: | + mv -v docs /tmp + git switch docs_html + git rm -r --ignore-unmatch docs + mv -v /tmp/docs/html docs + + - uses: EndBug/add-and-commit@v9 + with: + add: '. --force' + cwd: 'docs' + message: 'Update documentation' + new_branch: 'docs_html' + pull: '--ff-only' + push: true