diff --git a/.env.live b/.env.live new file mode 100644 index 0000000..6e39f90 --- /dev/null +++ b/.env.live @@ -0,0 +1,4 @@ +NODE_ENV=production +VUE_APP_BACKEND_URL=https://live.odysseuslarp.dev/ +VUE_APP_BACKEND_USER= +VUE_APP_BACKEND_PASS= diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..5f5a80c --- /dev/null +++ b/deploy.sh @@ -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" diff --git a/package.json b/package.json index e53bf2d..f037683 100644 --- a/package.json +++ b/package.json @@ -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": {