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
29 lines
1.0 KiB
Bash
Executable File
29 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
||
|
||
# Main 分支 worktree 路径
|
||
WORKTREE_PATH="/Users/chase/Documents/cozsweet-frontend-nextjs.worktrees/cozsweet-nextjs-main"
|
||
|
||
echo "=== 进入 main 分支 worktree ==="
|
||
cd "$WORKTREE_PATH"
|
||
|
||
echo "=== 检查当前分支 ==="
|
||
git branch --show-current
|
||
|
||
echo "=== 合并 dev 分支 ==="
|
||
git merge dev
|
||
|
||
# 复制生产环境图标(source: icons/production → dest: public/)
|
||
echo "=== 复制生产环境图标(icons/production → public/) ==="
|
||
cp -f icons/production/favicon.ico public/favicon.ico
|
||
cp -f icons/production/icons/Icon-192.png public/images/icons/Icon-192.png
|
||
cp -f icons/production/icons/Icon-512.png public/images/icons/Icon-512.png
|
||
|
||
# 准备生产环境变量(env-example/.env.production.example → .env.local,供 purge_cdn_cache 读 CDN 凭据)
|
||
echo "=== 准备生产环境变量(env-example/.env.production.example → .env.local) ==="
|
||
cp -f env-example/.env.production.example .env.local
|
||
|
||
echo "=== 执行构建部署脚本 ==="
|
||
./scripts/deploy/deploy_web.sh
|
||
|
||
echo "=== 发布完成 ==="
|