与 CI/CD 集成
了解如何在 GitBook 中自动更新您的 OpenAPI 规范
上传规范文件
# 将您的 GitBook API 令牌设置为环境变量
export GITBOOK_TOKEN=<api-token>
gitbook openapi publish \
--spec spec_name \
--organization organization_id \
example.openapi.yaml设置新的源 URL 或触发刷新
# 将您的 GitBook API 令牌设置为环境变量
export GITBOOK_TOKEN=<api-token>
gitbook openapi publish \
--spec spec_name \
--organization organization_id \
https://api.example.com/openapi.yaml使用 GitHub Actions 更新您的规范
最后更新于
这有帮助吗?