-
Notifications
You must be signed in to change notification settings - Fork 14
62 lines (56 loc) · 2.13 KB
/
documentation.yml
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
name: Documentation
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
env:
GOPRIVATE: "github.com/speakeasy-api"
jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
env:
CLI_RUNTIME: "docs"
steps:
- name: Checkout speakeasy repository
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
path: speakeasy
token: ${{ secrets.DOCUMENTATION_PAT }}
- name: Checkout speakeasy-registry repository
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
repository: speakeasy-api/speakeasy-registry
path: speakeasy-registry
token: ${{ secrets.DOCUMENTATION_PAT }}
- name: Configure git for private modules
env:
GITHUB_TOKEN: ${{ secrets.BOT_REPO_TOKEN }}
run: git config --global url."https://speakeasybot:${GITHUB_TOKEN}@github.com".insteadOf "https://github.com"
- name: Set up Go 1.x
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: "speakeasy/go.mod"
- name: Generate speakeasy cli docs
working-directory: speakeasy
run: |
go run cmd/docs/main.go
- name: Generate speakeasy-registry doc-site docs
working-directory: speakeasy
run: |
go run cmd/docs/main.go -out-dir ../speakeasy-registry/web/packages/marketing-site/src/pages/docs/speakeasy-cli -doc-site
# - name: Commit and push changes to speakeasy repo
# uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
# with:
# repository: speakeasy
# commit_message: "docs: update speakeasy cli docs [skip ci]"
- name: Create PR against speakeasy-registry
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
path: speakeasy-registry
token: ${{ secrets.DOCUMENTATION_PAT }}
commit-message: "docs: update speakeasy cli docs"
title: "docs: update speakeasy cli docs"