[Docs] Update merge workflow to push generated artifacts to sdk-docs repo #228
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
(These are basically the same changes as the TypeScript client, PR info is the same: pinecone-io/pinecone-ts-client#146)
The current flow for building and deploying documentation for SDK clients takes place within each repository. Currently,
merge
workflows handle the docs build step, and pushing the contents of the generated/docs
folder to a specific branch for each client:gh-pages
. This branch is then used as the deployment source for GitHub pages.There are several issues intrinsic in this:
Solution
Instead of having the CI workflows push documentation artifacts to a local branch, we can instead centralize our SDK documentation in a specific repo and allow workflows to commit docs updates directly to this repo. This allows us to deploy all our SDK documentation via one GitHub pages configuration. This also allows us to centralize all of our generated documentation, which could be useful in the future where we may move to a centralized docs-hosting solution that all the SDK repos need to feed into.
The changes in this PR are relatively small, and there was some pre-setup outside these changes:
Pre-Setup
pinecone-io/sdk-docs
private repo to house generated documentation artifacts.sdk-docs
and source repos (pinecone-ts-client
,pinecone-python-client
) to allow writing to thesdk-docs
repo. Documentation on this step. It's recommended to use SSH deploy keys over a GitHub PAT token.SSH_DEPLOY_KEY
.This PR
merge
workflow to use thegithub-action-push-to-another-repository
action. Action documentationType of Change
Test Plan
I should have all the prerequisites set up to allow our CI workflow to push directly to
sdk-docs
. For this change we can merge and verify that the resulting/docs
folder was correctly pushed tosdk-docs/typescript
.I tested the structure of the repo and publishing via GitHub pages in a personal repo:
https://github.com/austin-denoble/test-docs