test fix #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy Documentation | |
on: | |
push: | |
branches: | |
- gh-pages | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout gh-pages branch | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
- name: Set up Ruby for Jekyll | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1' | |
- name: Install Jekyll and Bundler | |
run: | | |
cd docs | |
bundle install | |
- name: Build Jekyll Site | |
run: | | |
cd docs | |
bundle exec jekyll build --destination ../_site | |
- name: Install Doxygen | |
run: sudo apt-get install doxygen -y | |
- name: Generate Doxygen Documentation for Branches | |
run: | | |
branches=("master" "orbit" "handle" "gloves" "desktop" "duo" "chromadeck" "spark") # List your branches here | |
for branch in "${branches[@]}" | |
do | |
if [ "$branch" == "master" ]; then | |
folder_name="core" | |
else | |
folder_name=$branch | |
fi | |
git fetch origin $branch:$branch | |
git checkout $branch | |
# Ensure you have the correct path to your Doxyfile in each branch | |
doxygen Doxyfile | |
mkdir -p docs/$folder_name | |
mv html/* docs/$folder_name # Move generated docs to the respective folder within 'docs' | |
done | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: _site # Path to the generated site directory | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |