feat(deploy): improve environment variable handling and deployment workflow
Deploy website on production server when committing on main / test (push) Failing after 12s

- Update .vars to properly export deployment configuration variables
- Modify deploy.sh to conditionally source .vars only in interactive mode
- Remove include directive from makefile to prevent automatic variable loading
- Enhance deployment script reliability by ensuring proper environment setup
This commit is contained in:
bryanpedini committed 2026-02-01 19:24:37 +01:00
1 parent 83728057ee
commit 2f2c60126c
3 files changed
+6 -3

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
#/usr/bin/env bash
"${DEPLOYMENT_HOST:=docker.infra.bjphoster.cloud}"
"${DEPLOYMENT_PATH:=/opt/pedini.dev}"
export DEPLOYMENT_HOST=docker.infra.bjphoster.cloud
export DEPLOYMENT_PATH=/opt/pedini.dev
+4
View File
@@ -12,6 +12,10 @@ set -e
# then remove everything in the data path, untar the tarball and reload the server
# finally remove the tarball, both from the remote host and locally (cleanup)
if [ -t 0 ]; then # Interactive: prompt user
source .vars
fi
# Check if the username variable is set
if [ ! -z "${SSH_USERNAME}" ]; then
SSH_USERNAME="${SSH_USERNAME}@"
-1
View File
@@ -1,5 +1,4 @@
#!make
include .vars
default: build