Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .github/workflows/upload-to-stainless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Check for "Skip Readme"
id: check_rdme
uses: actions/github-script@v7
with:
script: |
// Get the list of PRs merged into the current commit
const { data: prs } = await github.rest.repos.listPullRequestsAssociatedWithCommit({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: context.sha,
});

// Check if any PR has the "Skip Readme" label
if (prs.length > 0) {
const pr = prs[0]; // Assume the first PR is the relevant one
const hasIgnoreLabel = pr.labels.some(label => label.name === 'Skip Readme');
return hasIgnoreLabel;
}
return false;
result-encoding: string

# Upload OpenAPI spec to Stainless
- uses: stainless-api/upload-openapi-spec-action@main
with:
stainless_api_key: ${{ secrets.STAINLESS_API_KEY }}
input_path: 'openapi.yaml'
output_path: 'openapi.documented.yaml'
project_name: 'togetherai'

# Conditionally run the rdme step
- name: Update Readme docs
if: steps.check_rdme.outputs.result != 'true'
uses: readmeio/rdme@v8
with:
rdme: openapi "openapi.yaml" --key=${{ secrets.README_TOKEN }} --id=${{ secrets.README_DEFINITION_ID }}