From 670802aaee125602269e7ef0e0f5422119598e69 Mon Sep 17 00:00:00 2001 From: Thibaut Schaeffer Date: Tue, 10 Dec 2024 15:09:38 +0100 Subject: [PATCH] Fix book deploy again (#2218) 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. --- .github/workflows/deploy-book.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-book.yml b/.github/workflows/deploy-book.yml index cff7abd63..29ed1a93f 100644 --- a/.github/workflows/deploy-book.yml +++ b/.github/workflows/deploy-book.yml @@ -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