在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:bump-sh/github-action开源软件地址:https://github.com/bump-sh/github-action开源编程语言:TypeScript 96.3%开源软件介绍:Generate your API documentation & changelogBump 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. Table of contentsUsageStart by creating a documentation on Bump. Then add one of the following workflow file to your GitHub project Important: actions/checkout has to be called before this action. API diff on pull requestsIf you only want to have API diff summary sent as a comment on your pull requests:
name: API diff
on:
pull_request:
branches:
- main
jobs:
api-diff:
name: Check 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:
doc: <BUMP_DOC_ID>
token: ${{secrets.BUMP_TOKEN}}
file: doc/api-documentation.yml
command: diff
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} Important: make sure to change your main destination branch name ( API diff on pull requests & Deploy on pushThis is the most common worklow that we recommend using, which will create two steps in your automation flow: a validation & diff step on code reviews, followed by a deployment step on merged changes.
name: Check & deploy API documentation
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
deploy-doc:
if: ${{ github.event_name == 'push' }}
name: Deploy API documentation on Bump
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Deploy API documentation
uses: bump-sh/github-action@v1
with:
doc: <BUMP_DOC_ID>
token: ${{secrets.BUMP_TOKEN}}
file: doc/api-documentation.yml
api-diff:
if: ${{ github.event_name == 'pull_request' }}
name: Check 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:
doc: <BUMP_DOC_ID>
token: ${{secrets.BUMP_TOKEN}}
file: doc/api-documentation.yml
command: diff
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} Important: make sure to change your main destination branch name ( Deploy on pushIf you only need to deploy the documentation on push you can use this workflow file instead:
name: Deploy documentation
on:
push:
branches:
- main
jobs:
deploy-doc:
name: Deploy API doc on Bump
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Deploy API documentation
uses: bump-sh/[email protected]
with:
doc: <BUMP_DOC_ID>
token: ${{secrets.BUMP_TOKEN}}
file: doc/api-documentation.yml Important: make sure to change your main destination branch name ( Inputs
ContributingBug 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. LicenseThe scripts and documentation in this project are released under the MIT License. Code of ConductEveryone interacting in the Bump |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论