File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments