Skip to content

fixed up workflow

fixed up workflow #4

Workflow file for this run

name: Deploy Documentation to GitHub Pages
on:
push:
branches:
- gh-pages
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: gh-pages
fetch-depth: 0 # Full history needed for branch checkout
- name: Install Doxygen and Dependencies
run: sudo apt-get install -y doxygen graphviz texlive
- name: Checkout doxygen-awesome
run: git clone https://github.com/jothepro/doxygen-awesome-css.git doxygen-awesome-css
- name: Generate and Deploy Doxygen Documentation
run: |
branches=("master:core" "duo" "handle" "orbit" "gloves" "desktop" "spark" "chromadeck")
for item in "${branches[@]}"; do
IFS=':' read -r branch dest <<< "$item"
# Default destination is the branch name unless specified
dest="${dest:-$branch}"
# Checkout each branch, generate documentation, and move it to the correct directory
git checkout $branch
doxygen Doxyfile
# Move generated files to a temporary directory
temp_dir="/tmp/docs_$dest"
mkdir -p $temp_dir
mv docs/* $temp_dir/
# Ensure the final destination directory is prepared in the gh-pages branch
mkdir -p docs/$dest
mv $temp_dir/* docs/$dest/
# Clean up the temporary directory
rm -rf $temp_dir
echo "Generated docs for $branch, deployed to docs/$dest"
done
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./docs
pre_clean: true