Skip to content

Commit 8c184a5

Browse files
authored
Update cd.yml
1 parent 2308b0e commit 8c184a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/cd.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,16 @@ jobs:
2727
git config --global user.name "github-actions-bot"
2828
git config --global user.email "[email protected]"
2929
30+
# Fetch all branches and make sure we have history for gh-pages
31+
git fetch origin gh-pages
32+
3033
# Delete all files except .git
3134
find . -maxdepth 1 ! -name '.git' ! -name '.' -exec rm -rf {} +
3235
33-
# Create a new branch
36+
# Create a new branch from gh-pages
3437
timestamp=$(date +%s)
3538
branch_name="build-update-${timestamp}"
36-
git checkout -b $branch_name
39+
git checkout -b $branch_name origin/gh-pages
3740
3841
# Copy files from build folder
3942
cp -r /tmp/build/* .

0 commit comments

Comments
 (0)