Skip to content
This repository was archived by the owner on May 2, 2026. It is now read-only.

Commit 343e0d1

Browse files
authored
fix: deploy
1 parent 81454b7 commit 343e0d1

1 file changed

Lines changed: 32 additions & 34 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,84 @@
11
name: Deploy Benchmark Site
22

33
on:
4-
# Runs on pushes targeting the default branch
54
push:
65
branches: ["main"]
7-
8-
# Allows you to run this workflow manually from the Actions tab
96
workflow_dispatch:
107

11-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
128
permissions:
139
contents: read
1410
pages: write
1511
id-token: write
1612

17-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1813
concurrency:
1914
group: "pages"
2015
cancel-in-progress: false
2116

2217
jobs:
23-
# Build job
2418
build:
2519
runs-on: ubuntu-latest
2620
steps:
27-
# 1. Checkout the main source code (HTML, CSS, JS, etc.)
28-
- name: Checkout Source (Main)
21+
# 1. Checkout Main Branch
22+
- name: Checkout Source
2923
uses: actions/checkout@v4
3024

31-
# 2. Checkout the visual assets from 'vis-base' branch
32-
# We use sparse-checkout to ONLY fetch the 'results' folder.
33-
# This prevents downloading unnecessary history/files from the asset branch.
34-
- name: Checkout Visual Assets (vis-base)
25+
# 2. Checkout 'results' folder from vis-base
26+
- name: Checkout Visual Assets
3527
uses: actions/checkout@v4
3628
with:
37-
ref: vis-base # The branch with the images
38-
path: temp_vis_assets # Download to a temporary subfolder
29+
ref: vis-base
30+
path: temp_vis_assets
3931
sparse-checkout: |
4032
results
4133
sparse-checkout-cone-mode: false
4234

43-
# 3. Move the assets into the project root
44-
- name: Inject Visual Assets
35+
# 3. Move Assets & Ensure Gemfile exists
36+
# We move images into 'docs/results' so they are part of the site source.
37+
- name: Prepare Site Content
4538
run: |
46-
echo "Preparing to merge visual assets..."
47-
48-
# Remove existing results folder if it exists (empty) in main to avoid conflicts
49-
rm -rf ./results
50-
51-
# Move the results folder from the temp checkout to the root
52-
mv temp_vis_assets/results ./results
53-
54-
# Clean up temp folder
39+
echo "--- Moving Visual Assets ---"
40+
mkdir -p docs/results
41+
# Move contents of temp results to docs/results
42+
# (Using cp -r to be safe with sparse checkout structures, then rm)
43+
cp -r temp_vis_assets/results/* docs/results/
5544
rm -rf temp_vis_assets
5645
57-
# Verification: Count files to ensure sparse checkout worked
58-
FILE_COUNT=$(find ./results -type f | wc -l)
59-
echo "✅ Verification successful: Found $FILE_COUNT files in ./results"
46+
echo "--- Verifying Asset Count ---"
47+
echo "Found $(find docs/results -type f | wc -l) images in docs/results."
48+
49+
echo "--- Checking for Gemfile ---"
50+
if [ ! -f docs/Gemfile ]; then
51+
echo "No Gemfile found in docs/. Creating a default one for GitHub Pages..."
52+
echo 'source "https://rubygems.org"' > docs/Gemfile
53+
echo 'gem "github-pages", group: :jekyll_plugins' >> docs/Gemfile
54+
echo 'gem "webrick", "~> 1.8"' >> docs/Gemfile # Fix for Ruby 3.0+
55+
fi
6056
61-
# 4. Setup Ruby environment
57+
# 4. Setup Ruby (Runs inside 'docs' folder now)
6258
- name: Setup Ruby
6359
uses: ruby/setup-ruby@v1
6460
with:
6561
ruby-version: '3.1'
66-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
67-
cache-version: 1 # Increment if you need to force re-download gems
62+
bundler-cache: true
63+
working-directory: 'docs' # <--- CRITICAL: Tells bundler where to install
6864

6965
- name: Setup Pages
7066
id: pages
7167
uses: actions/configure-pages@v5
7268

73-
# 5. Build the site
74-
# Added --verbose and --trace for deep debugging info in logs
69+
# 5. Build (Runs inside 'docs' folder)
7570
- name: Build with Jekyll
71+
working-directory: 'docs' # <--- CRITICAL: Runs build in the correct folder
7672
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" --verbose --trace
7773
env:
7874
JEKYLL_ENV: production
7975

76+
# 6. Upload (Points to the _site folder generated inside docs)
8077
- name: Upload artifact
8178
uses: actions/upload-pages-artifact@v3
79+
with:
80+
path: 'docs/_site' # <--- CRITICAL: Points to the build output
8281

83-
# Deployment job
8482
deploy:
8583
environment:
8684
name: github-pages

0 commit comments

Comments
 (0)