GitHub Action

Steps to add a Bump GitHub Action

Generate your API documentation

Bump is a Continuous Documentation Platform: it lets you keep your API doc always synchronized with your codebase. With this Github Action you can automatically generate your API reference (with changelog and diff) on Bump from any OpenAPI or AsyncAPI file.

Usage

Start by creating a documentation on Bump. Then add this workflow to your GitHub project:

name: Deploy documentation
on:
push:
branches:
- master
jobs:
deploy-doc:
name: Deploy API doc on Bump
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Deploy API documentation
uses: bump-sh/github-[email protected]
with:
doc: <BUMP_DOC_ID>
token: ${{secrets.BUMP_TOKEN}}
file: doc/api-documentation.yml

actions/checkout has to be called before this action.

Input parameters

  • id (required): Documentation id or slug. Can be found in the documentation settings on https://bump.sh/docs

  • token (required): Do not add your documentation token here, but create an encrypted secret that holds your documentation token.

    • Your documentation token can be found in the documentation settings on https://bump.sh.

    • In your GitHub repository, click Settings, and then Secrets.

    • Click the button “New repository secret” and add your bump token. In the above example, the secret is called BUMP_TOKEN.

  • file: Relative path to the documentation file. Default: api-contract.yml.

  • command: Bump command to execute.

    • deploy (default): deploy a new version of the documentation

    • validate: validate the documentation file before a deployment

    • preview: create a temporary preview

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/bump-sh/github-action. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The scripts and documentation in this project are released under the MIT License.

Code of Conduct

Everyone interacting in the Bump github-action project codebase, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.