Skip to content

Commit

Permalink
Add build and deploy script for live environment [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
nicou committed Jun 11, 2024
1 parent 25fe0ce commit bee483b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .env.live
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NODE_ENV=production
VUE_APP_BACKEND_URL=https://live.odysseuslarp.dev/
VUE_APP_BACKEND_USER=
VUE_APP_BACKEND_PASS=
11 changes: 11 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -euo pipefail

DEPLOY_PATH="/var/www/odysseus/hansca/"
SOURCE_PATH="dist/"

npm run build:live

rsync -avzr --delete "$SOURCE_PATH" "$DEPLOY_PATH"
echo "Deployed to $DEPLOY_PATH"
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"start": "npm run serve",
"serve": "vue-cli-service serve",
"build": "VERSION=$(date '+%m%d.%H%M') && export VUE_APP_VERSION=$VERSION && cp -r fonts/* node_modules/onsenui/css/font_awesome && NODE_ENVIRONMENT=production vue-cli-service build",
"build:live": "VERSION=$(date '+%m%d.%H%M') && export VUE_APP_VERSION=$VERSION && cp -r fonts/* node_modules/onsenui/css/font_awesome && NODE_ENVIRONMENT=production vue-cli-service build --mode live",
"lint": "vue-cli-service lint"
},
"dependencies": {
Expand Down

0 comments on commit bee483b

Please sign in to comment.