Skip to content

Commit 51104ba

Browse files
committed
Create job to automatically update docs-content when API spec changes
1 parent 9592b30 commit 51104ba

File tree

2 files changed

+34
-29
lines changed

2 files changed

+34
-29
lines changed

.github/workflows/docusaurus-deploy.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/update-docs.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish API specs to docs
2+
3+
on:
4+
push:
5+
paths:
6+
- 'openapi/video-openapi.json'
7+
- 'openapi/video-openapi-clientside.json'
8+
- '.github/workflows/update-docs.yml'
9+
branches:
10+
- automatic-docs-update
11+
12+
jobs:
13+
push_to_docs:
14+
name: Push to docs
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- uses: actions/checkout@v4
21+
with:
22+
repository: GetStream/docs-content
23+
path: docs-content
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
ref: automatic-api-spec-update
26+
- name: push
27+
run: |
28+
git config --global user.email "[email protected]"
29+
git config --global user.name "GH Action CI Stream"
30+
cd docs-content
31+
cp ../openapi/video-openapi-clientside.json shared/assets/video-client-openapi.json
32+
cp ../openapi/video-openapi.json shared/assets/video-openapi.json
33+
git commit -m "Update video openapi Spec"
34+
git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)

0 commit comments

Comments
 (0)