Skip to content

test fix

test fix #30

Workflow file for this run

name: Build and Deploy Documentation
on:
push:
branches:
- gh-pages
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install GitHub CLI
run: sudo apt-get install gh -y
- name: Download Doxygen Documentation Artifacts
run: |
# Define branches with documentation to be included
declare -A branch_artifact_map=(
["core"]="master"
["desktop"]="desktop"
["gloves"]="gloves"
["orbit"]="orbit"
["handle"]="handle"
["duo"]="duo"
["chromadeck"]="chromadeck"
["spark"]="spark"
)
for branch in "${!branch_artifact_map[@]}"
do
artifact_name="doxygen-docs-${branch_artifact_map[$branch]}"
# Attempt to download each branch's artifact
echo "Attempting to download ${artifact_name}"
artifact_id=$(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository }}/actions/artifacts | jq -r ".artifacts[] | select(.name==\"${artifact_name}\") | .id")
if [ -n "$artifact_id" ]; then
echo "Artifact ${artifact_name} exists, downloading..."
mkdir -p docs/${branch}
gh run download --name ${artifact_name} --dir docs/${branch} || echo "Failed to download artifact for branch: ${branch}"
else
echo "Artifact ${artifact_name} does not exist, skipping..."
fi
done
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./docs
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_site
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4