Skip to content

Commit f118d0a

Browse files
authored
Merge pull request #54 from mozzy11/main
update deploy action
2 parents a157c5e + bcdde2c commit f118d0a

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/deploy-testing.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,22 @@ jobs:
5858
APP_DIR="${DEPLOY_PATH:-/home/ubuntu/openelis-docker}"
5959
REPO_URL="https://github.com/DIGI-UW/openelis-docker.git"
6060
61-
# --- fetch the latest deployment definition -----------------------
61+
# --- get the deployment definition --------------------------------
62+
# Clone on first deploy; afterwards just fast-forward to the latest.
6263
if [ ! -d "$APP_DIR/.git" ]; then
6364
git clone "$REPO_URL" "$APP_DIR"
6465
fi
6566
cd "$APP_DIR"
67+
68+
# Pull the latest deployment definition WITHOUT a hard reset. A
69+
# fast-forward only updates files that changed upstream, so it leaves
70+
# the containers' root-owned log files in configs/logs untouched
71+
# (a hard reset would try to overwrite them and fail: Permission
72+
# denied -> exit 128). Drop our prior .env edits first so the merge
73+
# never conflicts on .env; the cert overrides are re-applied below.
6674
git fetch origin main
67-
git reset --hard origin/main
75+
git checkout -- .env 2>/dev/null || true
76+
git merge --ff-only origin/main
6877
6978
# --- apply the testing-server env overrides -----------------------
7079
# set_env KEY VALUE : replace the line if the key exists, else append it

0 commit comments

Comments
 (0)