Skip to content

Refactor deploy workflow to include API documentation and update code… #1

Refactor deploy workflow to include API documentation and update code…

Refactor deploy workflow to include API documentation and update code… #1

Workflow file for this run

name: 📜 Check & deploy API documentation
permissions:
contents: read
pull-requests: write
on:
push:
branches:
- main
paths:
- 'docs/api-docs.yaml'
- '.github/workflows/bump.yml'
pull_request:
branches:
- main
paths:
- 'docs/api-docs.yaml'
- '.github/workflows/bump.yml'
jobs:
deploy-doc:
if: ${{ github.event_name == 'push' }}
name: Deploy API documentation on Bump.sh
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v3
- name: 🚀 Deploy API documentation
uses: bump-sh/github-action@v1
with:
doc: short
hub: jqshuv
token: ${{ secrets.BUMPSH_SECRET }}
file: docs/api-docs.yaml
api-diff:
if: ${{ github.event_name == 'pull_request' }}
name: Check API diff on Bump.sh
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: short
hub: jqshuv
token: ${{ secrets.BUMPSH_SECRET }}
file: docs/api-docs.yaml
command: diff
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}