Skip to content

Commit bd41669

Browse files
authored
DOP-5496: Create GH action to deploy Bump pages (#253)
1 parent 75e2ef5 commit bd41669

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Check & deploy API documentation
2+
3+
on:
4+
# For deployments
5+
workflow_dispatch: # Allow manual trigger in case of quick fix
6+
push:
7+
branches:
8+
- master
9+
paths:
10+
- 'source/rm-openapi-latest.json'
11+
12+
# For previews
13+
pull_request:
14+
branches:
15+
- master
16+
paths:
17+
- 'source/rm-openapi-latest.json'
18+
19+
permissions:
20+
contents: read
21+
22+
jobs:
23+
deploy-doc:
24+
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
25+
name: Deploy API documentation on Bump.sh
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
- name: Deploy API documentation
31+
uses: bump-sh/github-action@59eaae922e81ac8d127bd2b2ac6dc4804bda8a4c
32+
with:
33+
doc: ${{vars.RM_DOC_ID}}
34+
token: ${{secrets.BUMP_TOKEN}}
35+
file: source/rm-openapi-latest.json
36+
branch: main
37+
38+
api-preview:
39+
if: ${{ github.event_name == 'pull_request' }}
40+
name: Create API preview on Bump.sh
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
- name: Create API preview
46+
uses: bump-sh/github-action@59eaae922e81ac8d127bd2b2ac6dc4804bda8a4c
47+
with:
48+
doc: ${{vars.RM_DOC_ID}}
49+
token: ${{secrets.BUMP_TOKEN}}
50+
file: source/rm-openapi-latest.json
51+
branch: main
52+
command: preview

0 commit comments

Comments
 (0)