Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Update Doxygen docs

on:
push:
branches:
- main

jobs:
docs:
if: github.repository_owner == 'theonlyzac'
runs-on: ubuntu-latest
concurrency:
group: gh-pages-doxygen
cancel-in-progress: true
permissions:
contents: write
Comment thread
TheOnlyZac marked this conversation as resolved.

steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
submodules: recursive

- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main
path: sly1

- name: Install Doxygen and Graphviz
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz

- name: Preprocess headers
run: |
for file in $(find sly1/include/ -name "*.h"); do
sed -i '/#include "common.h"/d' "$file"
done
Comment thread
TheOnlyZac marked this conversation as resolved.

- name: Generate docs
run: |
rm -rf html
cp Doxyfile sly1/
Comment thread
TheOnlyZac marked this conversation as resolved.
cp sly1/docs/logo.png sly1/
cd sly1
doxygen Doxyfile
cp -r docs html
mv html/ ..
Comment thread
TheOnlyZac marked this conversation as resolved.

- name: Commit and push to gh-pages
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add html/
git diff --cached --quiet && echo "No changes to commit" || \
git commit -m "docs: update doxygen docs from main @ ${{ github.sha }}"
git push origin gh-pages
Loading