DOC-1409 Add CI/CD pipeline for deploying and previewing API docs#2
Conversation
|
🤖 API structural change detected: Modified (4)
|
| if echo "$CHANGED_FILES" | grep -q "^http-proxy/"; then | ||
| DOCS+=("http-proxy") | ||
| fi | ||
| # Check for changes in shared resources that might affect all docs |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Is the check for a -api.json just in case? (No need for the yaml equivalent?)
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
It's diffing the content in this PR against what is currently uploaded on Bump.
There was a problem hiding this comment.
I assume since we did the PoC, the spec changed and this repo now contains some changes.
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
mainbranch 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 themainbranch and includes permissions for reading repository contents and writing pull request comments.Determine Affected Documentation: The
determine-doc-idsjob 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-docjob 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-diffjob runs during pull requests to check for API differences using Bump.sh. It