2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-05-17 03:39:40 +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
+1
View File
@@ -20,6 +20,7 @@
"clean": "rimraf locale index.*",
"lint": "eslint src/**/*.{js,vue}",
"deploy:build": "parcel build ./example/index.html --public-url ./ --out-dir _site --no-source-maps --no-minify",
"deploy": "bash build/gh-pages-deploy.sh",
"format": "prettier --write src/**/*",
"test": "jest",
"cov": "jest --coverage --coverageReporters=text-lcov | coveralls",