From dbef359d932e206e32b47de84762ca89f9c8c068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=81=9A=E5=90=88=E6=9C=8D=E5=8A=A1=E5=B9=B3=E5=8F=B0?= Date: Thu, 7 Dec 2023 09:16:18 +0800 Subject: [PATCH] Update deploy.sh --- deploy.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/deploy.sh b/deploy.sh index 8b13789..ee1ef1c 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1 +1,22 @@ +#!/usr/bin/env sh +# enable throw error +set -e + +# build static pages +npm run build + +# enter build +cd build + +# publish pages +git init +git add -A +git commit -m 'deploy' +git push -f https://github.com/unitsvc/unitsvc.github.io.git master:gh-pages + +# switch origin directory +cd - + +# remove build pages +rm -rf ./build