From edffc0ba2c87d1d37b4fe774b95582dc7036abe8 Mon Sep 17 00:00:00 2001 From: Aditya Sanjeev Date: Sun, 12 Jul 2026 16:49:21 -0700 Subject: [PATCH] Harden deploy README: reinstall backend deps, guard git-pull conflicts and failed builds --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 97f9e78..33c570d 100644 --- a/README.md +++ b/README.md @@ -66,11 +66,14 @@ git fetch git checkout main git pull ``` +If `git pull` (or the checkout) refuses because of "local changes would be overwritten," someone edited files directly on the server. Do **not** force past it. Run `git status` to see what changed, then discard each file with `git checkout -- ` (or ask the maintainer) before pulling again. The server should never carry local edits. -#### 2. Rebuild the frontend +#### 2. Rebuild the frontend and refresh backend dependencies ``` cd /home/visitor/PanTS-Viewer/PanTS-Demo && npm ci && npm run build +/home/visitor/.conda/envs/PanTS_backend/bin/pip install -r /home/visitor/PanTS-Viewer/flask-server/requirements.txt ``` +The `pip install` is a fast no-op when nothing changed, but it is required whenever a PR adds or bumps a Python dependency — otherwise the restarted backend crashes on a missing import and the site goes empty. If `npm run build` errors out, **stop here**: nginx keeps serving the old site until a build succeeds, so fix the error before restarting the backend. #### 3. Restart the backend ```