Skip to content

Commit 082466f

Browse files
authored
fixing deploy.yml
1 parent 3639d3a commit 082466f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ jobs:
2727
2828
- name: Deploy to GitHub Pages
2929
run: |
30-
git checkout gh-pages || git checkout --orphan gh-pages
30+
git fetch origin gh-pages || true
31+
git checkout gh-pages 2>/dev/null || git checkout --orphan gh-pages
32+
git rm -rf . > /dev/null 2>&1 || true
33+
git clean -fxd
34+
cp -r ../$(basename $GITHUB_WORKSPACE)/* .
3135
git add .
32-
git commit -m "Deploy updates" || echo "No changes to commit"
33-
git push origin gh-pages
36+
git commit -m "Deploy updates from $(date)" || echo "No changes to commit"
37+
git push origin gh-pages

0 commit comments

Comments
 (0)