Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Doxygen documentation and gh-pages action #75

Merged
merged 18 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
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/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: GitHub Pages

on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'

jobs:
docs:
name: "Deploy"
runs-on: ubuntu-latest
env:
working-directory: ./doc

steps:
- uses: actions/checkout@main
- name: Dependencies
run: |
sudo apt update
sudo apt install -y xsltproc doxygen doxygen-doc texlive ghostscript graphviz python3-wheel python3-setuptools
pip3 install --upgrade Jinja2
pip3 install --user mkdocs mkdocs-material mkdocs-video pymdown-extensions
pip3 install --upgrade pygments
echo "${HOME}/.local/bin" >> ${GITHUB_PATH}

- name: Configure Git
run: |
git config --global push.default upstream
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git

- name: Build Doxygen
run: |
cd doxygen
./doc-compile.sh
working-directory: ${{ env.working-directory }}

- name: Build Mkdocs
run: |
cd mkdocs
./site-compile.sh
working-directory: ${{ env.working-directory }}

- name: Create and prepare gh-pages anew
run: |
git checkout --orphan gh-pages
rm -R `ls -A | grep -v -E "^(.git|doc)$"`
mv doc/mkdocs/site/* ./

- name: Commit and push
if: github.event_name == 'push'
run: |
git add .
git commit -m "Publish site"
git push --force --set-upstream origin gh-pages
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ build/
Debug/
Release/
*vcxproj.user
CMakeSettings.json
CMakeSettings.json
src/creo2urdf/doc/*
Loading