Create deploy script
This commit is contained in:
parent
0b74a918d6
commit
8b50adcd60
2 changed files with 17 additions and 1 deletions
15
deploy.sh
Executable file
15
deploy.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo "Building project ..."
|
||||||
|
npm run build
|
||||||
|
echo "Project build done!"
|
||||||
|
echo "-------------------"
|
||||||
|
|
||||||
|
echo "Removing existing folder on remote"
|
||||||
|
ssh root@202.61.225.50 rm -rf /var/www/codewanderer
|
||||||
|
echo "Folder on remote removed!"
|
||||||
|
echo "-------------------"
|
||||||
|
|
||||||
|
echo "Uploading new project state"
|
||||||
|
scp -r dist root@202.61.225.50:/var/www/codewanderer
|
||||||
|
echo "Upload complete!"
|
||||||
|
|
@ -7,7 +7,8 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "parcel index.html",
|
"dev": "parcel index.html",
|
||||||
"build": "parcel build index.html"
|
"build": "parcel build index.html",
|
||||||
|
"deploy": "./deploy.sh"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/p5": "^1.3.0",
|
"@types/p5": "^1.3.0",
|
||||||
|
|
|
||||||
Reference in a new issue