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:
@@ -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
|
||||
Reference in New Issue
Block a user