commit 5e2af3f687d931917dfac1a7b2fc692cf465fc3c
parent 29d60590b3532262a671f598a23f52b2c1e83e18
Author: tongong <tongong@gmx.net>
Date: Fri, 1 Apr 2022 18:27:49 +0200
updated github pages deploy script
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
@@ -2,16 +2,17 @@ dev:
npx parcel src/index.html --no-autoinstall
build:
- rm -r dist
+ rm -rf dist
npx parcel build src/index.html --no-autoinstall
# abuse of git but whatever i just want github pages
-# unstaged changes on master will be lost
deploy: build
+ git stash push
git checkout --orphan gh-pages
git --work-tree dist add --all
git --work-tree dist commit -m gh-pages
git push origin HEAD:gh-pages --force
- rm -r dist
+ rm -rf dist
git checkout -f master
git branch -D gh-pages
+ git stash pop