GitHub action to deploy your API documentation on Bump
This release includes two main improvements
ππ You can now deploy an entire directory of API documents to a Bump.sh hub. This was added in the CLI but was not yet possible with the GitHub action. For now the default filename-pattern is used ({slug}-api.[json|yaml]
so your API documents following this filename pattern will be deployed to your target hub)
To do so, you will need to use the hub:
input parameter of the GitHub action, and change the file:
input parameter to target a directory. Don't forget to remove an existing doc:
input parameter :slightly_smiling_face:.
Have fun documenting APIs β¨
This is a bugfix release which contains a fix to be able to send AsyncAPI 2.6.0 definition files. There was a bug in the JS dependency tree from the bump-cli
package which led to inconsistent node packages.
With this release the bug is gone! π
Have fun with AsyncAPI β¨
fail_on_breaking
input parameter useful for the diff
commandCheck our blog post announcement about our api diff
feature if you've never tried it
The diff
command can be used with a new input parameter fail_on_breaking
in order for the workflow to fail if the diff contains a breaking change. This is especially useful in a CI environment when diff is computed for each pull request.
jobs:
api-diff:
name: Check API diff on Bump
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Comment pull request with API diff
uses: bump-sh/github-action@v1
with:
doc: <BUMP_DOC_ID>
token: ${{secrets.BUMP_TOKEN}}
file: doc/api-documentation.yml
command: diff
# -------------
# NEW PARAMETER
# -------------
fail_on_breaking: true
# -------------
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
bump-cli
)Have fun designing APIs β¨
bump-cli
)public_url
from Diff responseHave fun designing APIs β¨
diff
command can now be called for different Api documentations on the same repositoryCheck our blog post announcement about our api diff
feature if you've never tried it
diff
command can now be used for as many existing Bump documentation as you wish, on the same repository. This means that if you have a git repository containing multiple Api specification file, each one attached to a dedicated documentation on Bump, you can define as many diff jobs in your workflow GitHub Action file as you wish. The important point is to provide the doc:
input (with the doc slug or id) to each github action invocation. cf #310Have fun designing APIs! β¨
bump-cli
) to support new Bump branching deploymentsTwo main changes in this release
You can now specify a new input parameter branch
during deployments done with this GitHub action. This is particularly useful when you want to keep multiple history available of your API documentation. For more information you can check the CLI release note.
AsyncAPI recently released their 2.4 version last month. Check out their blog post announcement: https://www.asyncapi.com/blog/release-notes-2.4.0 With this new release of the Bump GitHub Action we partially support the latest changes of the AsyncAPI spec.
Have fun designing APIs β¨
bump-cli
) to support AsyncAPI 2.3Have fun designing APIs β¨
diff
command can now be called unauthenticatedCheck our blog post announcement about our api diff
feature if you've never tried it
The diff
command can now be used without the need of an account on Bump. If you want to compare two API contracts you can use our GitHub Action without any further actions. You will get your API changes commented directly into your pull requests! Here is an example configuration to be able to run API diffs on OpenAPI or AsyncAPI contracts on a public projectΒ :
name: Diff API documentation
on:
pull_request_target:
branches:
- main # β Change this to the name of your target main branch
jobs:
public-api-diff:
if: ${{ github.event_name == 'pull_request_target' }}
name: Check public API diff on Bump
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Comment pull request with API diff
uses: bump-sh/github-action@v1
with:
file: openapi.yaml # β Change this to the path of your API contract file
command: diff
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
With this workflow, any PRs opened on your repository will get an API diff update through a pull request comment. So public contributions won't need any specific access to your repository, nor any specific access to your Bump.sh account.
Have fun designing APIs! β¨
This release introduces a visual change in the diff comments sent to GitHub pull requests. If you don't use the diff
command yet, please check out our release annoucement.
Here is a before/after to show you the new display (before in red, after in green):
The diff comment will now be more detailed and displayed in a markdown format instead of a raw text. We hope it will make your API design reviews easier. If you have feedback on the resulting format, please contact us, either via an issue on this repository or by email.
β¨