Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Commit e25cb9f

Browse files
author
Sameer Naik
authored
Merge pull request #86 from triggermesh/ghactions-genapi-docs
ci: move api docs generation to github actions
2 parents 2cd35e6 + 457bb0d commit e25cb9f

File tree

2 files changed

+46
-56
lines changed

2 files changed

+46
-56
lines changed

.circleci/config.yml

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

.github/workflows/gen-apidocs.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: API Docs
2+
3+
on:
4+
workflow_dispatch:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
tags: ['v*']
9+
10+
jobs:
11+
gen-apidocs:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v3
20+
with:
21+
go-version: 1.19.x
22+
23+
- name: Checkout triggermesh/docs
24+
uses: actions/checkout@v3
25+
with:
26+
path: 'tm-docs'
27+
ref: 'main'
28+
repository: 'triggermesh/docs'
29+
token: ${{ secrets.BOT_TOKEN }}
30+
31+
- name: Run gen-apidocs
32+
run: TRIGGERMESH_COMMIT=${{github.ref_name}} make gen-apidocs
33+
env:
34+
DOCS_OUTPUT_DIR: ${GITHUB_WORKSPACE}/tm-docs/docs/reference/
35+
36+
- name: Commit and push changes
37+
working-directory: tm-docs
38+
run: |
39+
git add -A
40+
git status --porcelain
41+
if [[ $(git status --porcelain | wc -l) -gt 0 ]]; then
42+
git config --global user.name 'TriggerMesh Bot'
43+
git config --global user.email '[email protected]'
44+
git commit -m "Generated from commit ${{github.sha}} on triggermesh/triggermesh-core"
45+
git push
46+
fi

0 commit comments

Comments
 (0)