Skip to content

Commit cff6a0f

Browse files
docs(readme): update deployment section for CI-based gh-pages flow
Replace local deploy instructions with authoritative GitHub Actions workflow documentation. Update site URL to builder.hagicode.com. Co-Authored-By: Hagicode <noreply@hagicode.com> Signed-off-by: newbe36524 <newbe36524@qq.com>
1 parent 1c63757 commit cff6a0f

2 files changed

Lines changed: 26 additions & 24 deletions

File tree

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,14 @@ Expected behavior:
6868

6969
### Deploy to GitHub Pages
7070

71-
#### Automatic Deployment (GitHub Actions)
71+
The authoritative production deployment path is GitHub Actions.
7272

73-
The project is configured with GitHub Actions to automatically deploy to GitHub Pages when code is pushed to the `main` branch.
74-
75-
#### Manual Deployment
76-
77-
```bash
78-
npm run deploy
79-
```
80-
81-
This will build the application and deploy it to the `gh-pages` branch.
73+
- Authoritative workflow: `.github/workflows/deploy-gh-pages.yml`
74+
- Production source of truth: the `gh-pages` branch, published only after CI validation succeeds
75+
- Published payload contract: branch root `esa.jsonc` plus `dist/` containing the validated Vite output
76+
- Required GitHub permissions: the deploy job needs `contents: write`; the build job stays read-only
77+
- Supported triggers: push to `main` and `workflow_dispatch`
78+
- Legacy path retired: local `gh-pages` CLI publication is no longer a supported production flow
8279

8380
### GitHub Pages Configuration
8481

@@ -89,15 +86,19 @@ This will build the application and deploy it to the `gh-pages` branch.
8986
- Choose "gh-pages" branch and "/ (root)" folder
9087
- Click "Save"
9188

92-
2. The application will be available at:
93-
`https://<your-username>.github.io/docker-compose-builder/`
89+
2. Ensure the hosting layer reads `gh-pages/esa.jsonc` and serves `gh-pages/dist/`.
90+
91+
3. The production site should remain available at:
92+
`https://builder.hagicode.com`
9493

9594
### Deployment Troubleshooting
9695

9796
- **404 Error**: Ensure GitHub Pages is properly configured and the `gh-pages` branch exists
9897
- **Assets not loading**: Check that `vite.config.ts` has the correct `base` configuration
9998
- **Build failures**: Verify dependencies are installed correctly with `npm ci`
10099
- **Permissions**: Ensure the GitHub Actions workflow has the necessary permissions
100+
- **First deploy checks**: Confirm the workflow uploaded `esa.jsonc` and `dist/`, then verify `https://builder.hagicode.com`
101+
- **Rollback**: Revert the source change or rerun the workflow from an older commit so CI republishes the previous snapshot
101102

102103
### Configuration Options
103104

README_cn.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,14 @@ npm run dev
6868

6969
### 部署到 GitHub Pages
7070

71-
#### 自动部署(GitHub Actions
71+
唯一权威的生产部署路径是 GitHub Actions
7272

73-
项目配置了 GitHub Actions,当代码推送到 `main` 分支时自动部署到 GitHub Pages。
74-
75-
#### 手动部署
76-
77-
```bash
78-
npm run deploy
79-
```
80-
81-
这将构建应用程序并部署到 `gh-pages` 分支。
73+
- 权威工作流:`.github/workflows/deploy-gh-pages.yml`
74+
- 生产 source of truth:`gh-pages` 分支,只在 CI 校验通过后发布
75+
- 发布 payload 契约:分支根目录保留 `esa.jsonc`,验证通过的 Vite 产物统一放在 `dist/`
76+
- 所需 GitHub 权限:deploy job 需要 `contents: write`,build job 保持只读
77+
- 支持触发方式:推送到 `main`,以及 `workflow_dispatch`
78+
- 旧路径已退役:本地 `gh-pages` CLI 发布不再是受支持的生产发布方式
8279

8380
### GitHub Pages 配置
8481

@@ -89,15 +86,19 @@ npm run deploy
8986
- 选择 "gh-pages" 分支和 "/ (root)" 文件夹
9087
- 点击 "Save"
9188

92-
2. 应用程序将在以下地址可用:
93-
`https://<your-username>.github.io/docker-compose-builder/`
89+
2. 确保托管层读取 `gh-pages/esa.jsonc`,并把 `gh-pages/dist/` 作为站点目录。
90+
91+
3. 生产站点地址保持为:
92+
`https://builder.hagicode.com`
9493

9594
### 部署故障排除
9695

9796
- **404 错误**:确保 GitHub Pages 正确配置且 `gh-pages` 分支存在
9897
- **资源未加载**:检查 `vite.config.ts` 是否有正确的 `base` 配置
9998
- **构建失败**:使用 `npm ci` 验证依赖是否正确安装
10099
- **权限**:确保 GitHub Actions 工作流具有必要的权限
100+
- **首次部署检查**:确认工作流上传了 `esa.jsonc``dist/`,然后验证 `https://builder.hagicode.com`
101+
- **回滚**:回退 source 提交,或从旧提交重新运行工作流,让 CI 重新发布上一份快照
101102

102103
### 配置选项
103104

0 commit comments

Comments
 (0)