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 809f1b6 commit 4b4108d
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,41 @@ on:
push:
branches:
- gh-pages
workflow_dispatch: # Allows manual trigger from the Actions tab

permissions:
contents: write
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest

steps:
# Checkout the gh-pages branch to have access to the existing docs directory
- name: Checkout gh-pages
- name: Checkout
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages # Checkout to a specific directory to separate it from source

# Setup Pages environment and dependencies
- name: Setup Pages
uses: actions/configure-pages@v5

# Build Jekyll Site
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: gh-pages/docs
destination: gh-pages/_site
source: ./
destination: ./_site

# Install Doxygen and Dependencies
- name: Install Doxygen and Dependencies
run: sudo apt-get update && sudo apt-get install -y doxygen graphviz

# Generate Doxygen Documentation
- name: Generate Doxygen Documentation
run: |
# Define the branches and their corresponding doc folders
branches=("master:core" "duo" "handle" "orbit" "gloves" "desktop" "spark" "chromadeck")
mkdir -p gh-pages/docs # Ensure the docs directory exists
mkdir -p _site/docs # Ensure the docs directory exists
# Iterate over each branch and generate documentation
for item in "${branches[@]}"; do
Expand All @@ -59,12 +55,12 @@ jobs:
# Change directory to the worktree
cd temp/$branch
# Ensure the output directory exists in the docs folder
mkdir -p ../../gh-pages/docs/$dest
# Ensure the output directory exists in the _site/docs folder
mkdir -p ../../_site/docs/$dest
# Adjust the Doxyfile to set the output directory
echo "Adjusting Doxyfile for branch: $branch"
sed -i "s|OUTPUT_DIRECTORY *=.*|OUTPUT_DIRECTORY = ../../gh-pages/docs/$dest|" Doxyfile
sed -i "s|OUTPUT_DIRECTORY *=.*|OUTPUT_DIRECTORY = ../../_site/docs/$dest|" Doxyfile
# Run Doxygen to generate the documentation
echo "Running Doxygen for branch: $branch"
Expand All @@ -80,12 +76,16 @@ jobs:
fi
done
# Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: gh-pages/_site
publish_branch: gh-pages
keep_files: true
- name: Upload artifact
uses: actions/upload-pages-artifact@v3

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 4b4108d

Please sign in to comment.