Skip to content

fix: nil pointer in configure github (#1077) #970

fix: nil pointer in configure github (#1077)

fix: nil pointer in configure github (#1077) #970

Workflow file for this run

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"