Create deploy script

This commit is contained in:
Dennis Schoepf 2021-07-14 16:35:57 +02:00
parent 0b74a918d6
commit 8b50adcd60
2 changed files with 17 additions and 1 deletions

15
deploy.sh Executable file
View 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!"

View file

@ -7,7 +7,8 @@
"license": "MIT",
"scripts": {
"dev": "parcel index.html",
"build": "parcel build index.html"
"build": "parcel build index.html",
"deploy": "./deploy.sh"
},
"devDependencies": {
"@types/p5": "^1.3.0",