Skip to content

Conversation

@JakeSCahill
Copy link
Contributor

This pull request introduces a new GitHub Actions workflow to automate the deployment and diff-checking of API documentation using Bump.sh. The workflow is triggered on pushes and pull requests to the main branch and includes three main jobs: determining affected API documentation, deploying updated documentation, and checking API diffs for pull requests.

New GitHub Actions Workflow for API Documentation

  • Workflow Trigger and Permissions: The workflow, defined in .github/workflows/bump.yml, is triggered on pushes and pull requests to the main branch and includes permissions for reading repository contents and writing pull request comments.

  • Determine Affected Documentation: The determine-doc-ids job identifies which API documentation folders (admin, cloud-controlplane, cloud-dataplane, schema-registry, http-proxy) have changes. It also accounts for shared resources that might impact multiple APIs and generates a matrix of affected documentation IDs.

  • Deploy Updated Documentation: The deploy-doc job deploys updated API documentation to Bump.sh for affected APIs. It determines the appropriate file format (YAML or JSON) and applies overlays specific to the API or shared resources.

  • Check API Diffs: The api-diff job runs during pull requests to check for API differences using Bump.sh. It

@github-actions
Copy link

github-actions bot commented Jun 26, 2025

🤖 API structural change detected:

Modified (4)

  • GET /v1/clusters
    • Response modified: 200
      • Content type modified: application/json
        • Property modified: clusters
          • Property modified: customer_managed_resources
  • GET /v1/clusters/{id}
    • Response modified: 200
      • Content type modified: application/json
        • Property modified: cluster
          • Property modified: customer_managed_resources
  • PATCH /v1/clusters/{cluster.id}
    • Content type modified: application/json
      • Property modified: customer_managed_resources
        • Property modified: gcp
          • Property added: psc_v2_nat_subnet_name
      • Property added: cloud_storage
    • Response modified: 202
      • Content type modified: application/json
        • Property modified: customer_managed_resources
          • Property modified: gcp
        • Property added: cloud_storage
  • POST /v1/clusters
    • Content type modified: application/json
      • Property modified: cluster
        • Property modified: customer_managed_resources
          • Property modified: gcp
        • Property added: cloud_storage

Preview documentation

Powered by Bump.sh

@JakeSCahill JakeSCahill changed the title Add CI/CD pipeline for deploying and previewing API docs DOC-1409 Add CI/CD pipeline for deploying and previewing API docs Jun 26, 2025
@JakeSCahill JakeSCahill requested a review from kbatuigas June 26, 2025 13:41
if echo "$CHANGED_FILES" | grep -q "^http-proxy/"; then
DOCS+=("http-proxy")
fi
# Check for changes in shared resources that might affect all docs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it still be all right if the files in shared/ don't necessarily affect all docs? Right now the files in that directory really only apply to the Cloud APIs.

echo "file_path=${{ matrix.doc_id }}/${{ matrix.doc_id }}.yaml" >> $GITHUB_OUTPUT
elif [ -f "${{ matrix.doc_id }}/${{ matrix.doc_id }}.json" ]; then
echo "file_path=${{ matrix.doc_id }}/${{ matrix.doc_id }}.json" >> $GITHUB_OUTPUT
elif [ -f "${{ matrix.doc_id }}/${{ matrix.doc_id }}-api.json" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the check for a -api.json just in case? (No need for the yaml equivalent?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove that check. It was from before I updated the filenames 😄

doc: ${{ matrix.doc_id }}
token: ${{secrets.BUMP_TOKEN}}
file: ${{ steps.format.outputs.file_path }}
command: diff
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious about the diff comment that was added to the PR. I don't see changes to the API definitions (just the filenames if I'm understanding correctly) in the PR but it's identified a few changes to properties. Is this expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's diffing the content in this PR against what is currently uploaded on Bump.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume since we did the PoC, the spec changed and this repo now contains some changes.

@JakeSCahill JakeSCahill closed this Jul 3, 2025
@JakeSCahill JakeSCahill reopened this Jul 3, 2025
@JakeSCahill JakeSCahill requested a review from kbatuigas July 7, 2025 16:23
Copy link
Contributor

@kbatuigas kbatuigas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@JakeSCahill JakeSCahill merged commit 5f40741 into main Jul 7, 2025
7 checks passed
@JakeSCahill JakeSCahill deleted the action branch July 7, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants