-
Notifications
You must be signed in to change notification settings - Fork 41
65 lines (56 loc) · 1.54 KB
/
ci.yaml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Continuous Integration
on:
pull_request:
workflow_dispatch:
release:
types: [published]
jobs:
update:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
path: cli
- name: Checkout tools repo
uses: actions/checkout@v4
with:
repository: temporalio/documentation
path: docs
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Generate CLI docs
run: |
set -x
pwd
echo "$pwd"
ls
ls temporalcli
ls temporalcli/internal
ls temporalcli/internal/cmd
ls temporalcli/internal/cmd/gen-docs
cd cli
cd temporalcli
cd internal
cd cmd
cd gen-docs
go run .
- name: Copy files over and generate PR
run: |
BRANCH_NAME="cli-update-docs-${{ github.ref_name }}"
cd docs
git checkout -b $BRANCH_NAME
cp ../cli/temporalcli/docs/*.mdx docs/cli/
git add .
git commit -m "CLI docs update, autogenerated on CLI release, ${{ github.ref_name }}"
git push origin $BRANCH_NAME
gh pr create \
--body "Autogenerated PR from https://github.com/temporalio/cli" \
--title "CLI docs update $LATEST_TAG" \
--head "$BRANCH_NAME" \
--base "main"