feat: add x-speakeasy-react-hook extension for customising generated … #1019
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
path: speakeasy | |
token: ${{ secrets.DOCUMENTATION_PAT }} | |
- name: Checkout speakeasy-registry repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
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@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | |
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" |