2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-20 13:40:36 +03:00

build: add deploy sh

This commit is contained in:
mengxiong10
2019-11-12 12:56:48 +08:00
parent 9ea53a5923
commit e4a5cedaa6
2 changed files with 23 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
directory=_site
branch=gh-pages
echo -e "\033[0;32mDeleting old content...\033[0m"
rm -rf $directory
echo -e "\033[0;32mChecking out $branch....\033[0m"
git worktree add $directory $branch
echo -e "\033[0;32mGenerating site...\033[0m"
npm run deploy:build
echo -e "\033[0;32mDeploying $branch branch...\033[0m"
cd $directory &&
git add --all &&
git commit -m "Deploy updates" &&
git push origin $branch
echo -e "\033[0;32mCleaning up...\033[0m"
cd ../
git worktree remove $directory