chore: CI/CD improvements — frontend build check, health check, rollback#241
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa21df5aca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if ! npm run build; then | ||
| echo "✗ Frontend build failed — rolling back to $PREVIOUS_COMMIT" | ||
| cd /var/opt/riftline/app | ||
| git reset --hard "$PREVIOUS_COMMIT" |
There was a problem hiding this comment.
Restore previous dist on frontend build rollback
When npm run build reaches the Vite phase and then fails, Vite prepares the output directory before writing (emptyOutDir defaults to true for an in-root dist), and apps/web/dist is gitignored while the running API serves that directory from disk in production. In that failure mode this rollback only resets tracked files, so the old PM2 process can continue serving an emptied or partially rewritten frontend until someone manually rebuilds the previous commit; rebuild the previous frontend (and restore deps if needed) before exiting this rollback path.
Useful? React with 👍 / 👎.
Problemas que resuelve
tsc --noEmit(root tsconfig) que no detectaba los mismos errores quetsc -benapps/webCambios en el pipeline
CI (pull_request + push a main):
npm run buildenapps/web— misma compilación que producciónDeploy (push a main tras CI):
i18n: Añadida clave
nav.invitationsen ES y EN — causaba el error de build silencioso