-
Notifications
You must be signed in to change notification settings - Fork 2
DOC-1409 Add CI/CD pipeline for deploying and previewing API docs #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
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.
.github/workflows/bump.yml
Outdated
| 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.
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?)
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
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