Skip to content

Commit b575044

Browse files
committed
Automate API doc generation
1 parent fb303ba commit b575044

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/docs-refresh.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This is a basic workflow that is manually triggered
2+
3+
name: API docs refresh
4+
5+
# Controls when the action will run. Workflow runs when manually triggered using the UI
6+
# or API.
7+
on:
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
# The type of runner that the job will run on
13+
runs-on: ubuntu-latest
14+
15+
# Steps represent a sequence of tasks that will be executed as part of the job
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
ref: 'master'
20+
- name: Use Node.js
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: '12.x'
24+
- run: cd api-docs-gen && npm ci
25+
- run: api-docs-gen/docs-refresh.sh master
26+
- run: api-docs-gen/docs-refresh.sh develop
27+
- run: api-docs-gen/commit-and-push.sh

api-docs-gen/commit-and-push.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
git config --global user.email "[email protected]"
6+
git config --global user.name "Deepak Kumar"
7+
8+
git add -A
9+
10+
if git commit -m "Committed by Github action"
11+
then
12+
git push origin HEAD
13+
fi

0 commit comments

Comments
 (0)