Merge pull request #16 from handsomezhuzhu/codex/add-config-file-for-aliyun-esa-deployment

Add ESA deployment configuration
This commit is contained in:
Simon
2025-12-11 17:15:37 +08:00
committed by GitHub
2 changed files with 21 additions and 0 deletions

View File

@@ -95,3 +95,18 @@ export default defineConfig({
如果需要进一步修改部署和构建配置,请直接编辑 `.github/workflows/deploy.yml` 文件。 如果需要进一步修改部署和构建配置,请直接编辑 `.github/workflows/deploy.yml` 文件。
## 阿里云 ESA 部署
为了在阿里云 ESA函数与 Pages中完成一键部署项目根目录新增了 `esa.json` 配置文件,内容包含安装命令、构建命令、输出目录及 Node.js 版本要求。ESA 会自动读取这些信息完成依赖安装和静态产物构建,无需额外脚本:
```json
{
"installCommand": "npm install",
"buildCommand": "npm run build",
"outputDirectory": "docs/.vitepress/dist",
"nodeVersion": "18.20.4"
}
```
如果后续需要调整构建流程,只需按需修改对应字段即可。

6
esa.json Normal file
View File

@@ -0,0 +1,6 @@
{
"installCommand": "npm install",
"buildCommand": "npm run build",
"outputDirectory": "docs/.vitepress/dist",
"nodeVersion": "18.20.4"
}