d76b048bb9
- 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
15 lines
523 B
Bash
Executable File
15 lines
523 B
Bash
Executable File
#!/bin/sh
|
||
# Post-receive hook: push 后自动 build + start
|
||
#
|
||
# 触发场景:
|
||
# - 非 bare repo + receive.denyCurrentBranch=updateInstead:本地推送自动部署
|
||
#
|
||
# 用途:执行 package.json 中的 `build:start` 脚本
|
||
# - 内部 = `npm run build && npm run start`
|
||
# - 实际调用 `pnpm run build:start`(项目使用 pnpm)
|
||
|
||
# 准备生产环境变量(从 env-example/.env.production.example 复制 → .env.production)
|
||
cp -f env-example/.env.production.example .env.production
|
||
|
||
pnpm run build:start
|