Commit Graph

3 Commits

Author SHA1 Message Date
admin d76b048bb9 chore: move env examples to env-example/ and unify CDN env source
- Reorganize env example files into a dedicated env-example/ directory for clarity
- Update .gitignore to ignore env files (with examples now in env-example/)
- Unify CDN credentials (CF_ZONE_ID / CF_API_TOKEN) to be sourced from .env.local in both test and production deploys
- Update git_hooks/post-receive to copy production env example from new location
- Update deploy scripts (pre_release_web.sh, release_web.sh) to copy the appropriate env example into .env.local before building
- Update _deploy_lib.sh purge_cdn_cache to source from .env.local instead of .env
2026-06-12 15:05:37 +08:00
admin 4fa1ddf22f chore(hooks): copy env example to production env in post-receive
Add preparation step for production environment variables by copying
.env.production.example to .env.production before running build:start,
ensuring required environment variables are available on deployment.
2026-06-12 14:40:07 +08:00
admin c4fa692528 feat: add git post-receive hook for auto build and start
Adds a `git_hooks/post-receive` script that runs `pnpm run build:start`
(equivalent to `next build && next start`) automatically after a push is
received, enabling deployment on `receive.denyCurrentBranch=updateInstead`
configured repos (e.g., production/test servers).

Updates the README with a new "Git Hooks" section explaining:

- How to enable the hooks locally via `git config core.hooksPath git_hooks`
- That `core.hooksPath` is a local config and must be set per clone
- That `post-receive` fires on the receiving (push target) machine, not
  the local dev machine
2026-06-12 14:06:41 +08:00