How to integrate your documentation deployment to your CI.
Here, we are presenting the process recommended to our customers, but feel free to adapt it to your own workflow/requirements.
We recommend two steps in your automation flow: a validation one during development, followed by a deployment one on production merges.
With our Github Action, you can receive automatic API diff comments directly on your pull requests. This is done thanks to the
bump diffcommand under the hood which will run each time a pull request is created or updated. It will make sure to fail the build if the documentation file is not valid.
If you don't use Github, for each branch of your code base you can check that your documentation file is still valid and will not fail during deployment. By using the
bump deploy --dry-runcommand each time a branch is pushed you will make sure to fail the build if the documentation file is not valid. You can also use the
bump diffcommand to validate your documentation file and to output the API diff in your CI logs.
Once your branch has been merged into your main branch (generally the
mainone) you will want to deploy your new documentation file and make it live. You will use the
If you prefer not using a
package.json, be sure to install the CLI globally with
npm install -g bump-clibefore calling the
Here are examples for integrating Bump with the most commonly used CI products:
Note that if you don't want to keep the private token and id in your code base, you should use environment variables. Our CLI automatically recognizes these 3 variables: