Integrating with CI/CD
Learn how to automate the update of your OpenAPI specification in GitBook
Upload a specification file
# Set your GitBook API token as an environment variable
export GITBOOK_TOKEN=<api-token>
gitbook openapi publish \
--spec spec_name \
--organization organization_id \
example.openapi.yamlSet a new source URL or trigger a refresh
# Set your GitBook API token as an environment variable
export GITBOOK_TOKEN=<api-token>
gitbook openapi publish \
--spec spec_name \
--organization organization_id \
https://api.example.com/openapi.yamlUpdate your spec with GitHub Actions
Last updated
Was this helpful?