Skip to content

Commit

Permalink
Fix book deploy again (#2218)
Browse files Browse the repository at this point in the history
Turns out `git worktree` does not track the remote branch, so the
benchmarks are not there.
Revert to what we did before, and explicitly restore the benchmarks from
the remote `gh-pages` branch.
  • Loading branch information
Schaeff authored Dec 10, 2024
1 parent 0a12ffe commit 670802a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ jobs:
cd gh-pages
# Delete the ref to avoid keeping history.
git update-ref -d refs/heads/gh-pages
# Delete everything except the `dev` folder, as it contains benchmarks we should keep.
find . -mindepth 1 -maxdepth 1 ! -name "dev" ! -name ".*" -exec rm -rf {} +
rm -rf *
mv ../book/* .
# restore the benchmark directory
git restore --source=origin/gh-pages -- dev
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force --set-upstream origin gh-pages

0 comments on commit 670802a

Please sign in to comment.