fix(deploy): don't inject CI runner token into ppms #43
No reviewers
Labels
No labels
bug
claude-failed
claude-pr
claude-queue
claude-working
feature
interactive
portal
triaged
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: shad0w/pelagia-portal#43
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/deploy-no-update-env"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the prod Report Issue 401 ("user does not exist [uid: 0]").
Cause: the deploy job runs inside the Forgejo Actions runner, which sets an ephemeral
FORGEJO_TOKEN(per-job token).pm2 restart ppms --update-envinjected it into the app process; Next.js won't override an already-setprocess.envvar, so the app used the job token instead of the PAT in.env. When the job ended, that token was revoked -> 401.Fix: drop
--update-envso ppms re-execs from the pm2 daemon's clean env and reads the real token from.env.Prod was already hot-fixed (clean
pm2restart +pm2 save); this makes future tag deploys safe. Automation/CI only.