-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathgenerate-bump-pages-openapi-data-api.yml
More file actions
50 lines (45 loc) · 1.38 KB
/
generate-bump-pages-openapi-data-api.yml
File metadata and controls
50 lines (45 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Check & deploy Data API documentation
on:
# For deployments
workflow_dispatch: # Allow manual trigger in case of quick fix or retrigger
push:
branches:
- master
paths:
- 'source/openapi-data-api-v1.bundled.yaml'
# For previews
pull_request:
branches:
- master
paths:
- 'source/openapi-data-api-v1.bundled.yaml'
permissions:
contents: read
jobs:
deploy-doc:
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
name: Deploy API documentation on Bump.sh
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Deploy API documentation
uses: bump-sh/github-action@59eaae922e81ac8d127bd2b2ac6dc4804bda8a4c
with:
doc: ${{vars.DATA_API_V1_DOC_ID}}
token: ${{secrets.BUMP_TOKEN}}
file: source/openapi-data-api-v1.bundled.yaml
api-preview:
if: ${{ github.event_name == 'pull_request' }}
name: Create API preview on Bump.sh
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create API preview
uses: bump-sh/github-action@59eaae922e81ac8d127bd2b2ac6dc4804bda8a4c
with:
doc: ${{vars.DATA_API_V1_DOC_ID}}
token: ${{secrets.BUMP_TOKEN}}
file: source/openapi-data-api-v1.bundled.yaml
command: preview