mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-22 22:20: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
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
"clean": "rimraf locale index.*",
|
"clean": "rimraf locale index.*",
|
||||||
"lint": "eslint src/**/*.{js,vue}",
|
"lint": "eslint src/**/*.{js,vue}",
|
||||||
"deploy:build": "parcel build ./example/index.html --public-url ./ --out-dir _site --no-source-maps --no-minify",
|
"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/**/*",
|
"format": "prettier --write src/**/*",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"cov": "jest --coverage --coverageReporters=text-lcov | coveralls",
|
"cov": "jest --coverage --coverageReporters=text-lcov | coveralls",
|
||||||
|
|||||||
Reference in New Issue
Block a user