Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal-Dan committed Aug 5, 2024
1 parent cad7902 commit a64fa8a
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
build-jekyll:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages
- name: Checkout
uses: actions/checkout@v4
with:
ref: gh-pages
Expand Down Expand Up @@ -57,26 +57,37 @@ jobs:
- name: Generate Doxygen Documentation
run: |
branches=("master:core" "duo" "handle" "orbit" "gloves" "desktop" "spark" "chromadeck")
rm -rf docs || true
mkdir -p docs # Ensure the docs directory is clean and prepared
for item in "${branches[@]}"; do
IFS=':' read -r branch dest <<< "$item"
dest="${dest:-$branch}"
# Ensure the output directory exists
mkdir -p docs/$dest
# Create a worktree for the branch in a separate directory
echo "Setting up worktree for branch: $branch"
git worktree add worktree/$branch $branch
# Change directory to the worktree
cd worktree/$branch
# Checkout each branch and generate documentation
echo "Checking out branch: $branch"
git checkout $branch
# Ensure the output directory exists
mkdir -p ../../docs/$dest
# Change OUTPUT_DIRECTORY in Doxyfile for each branch
echo "Adjusting Doxyfile for branch: $branch"
sed -i "s|OUTPUT_DIRECTORY *=.*|OUTPUT_DIRECTORY = docs/$dest|" Doxyfile
sed -i "s|OUTPUT_DIRECTORY *=.*|OUTPUT_DIRECTORY = ../../docs/$dest|" Doxyfile
echo "Running Doxygen for branch: $branch"
doxygen Doxyfile || { echo "Doxygen failed for branch: $branch"; exit 1; }
echo "Generated docs for $branch in docs/$dest"
# Return to the root directory
cd ../..
# Remove the worktree after processing
git worktree remove worktree/$branch -f
done
- name: Upload Doxygen Docs
Expand Down

0 comments on commit a64fa8a

Please sign in to comment.