Skip to content
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

Allow gh-pages deployment to persist CNAME file #227

Closed
wants to merge 1 commit into from

Conversation

austin-denoble
Copy link
Contributor

(Same CI changes as the TypeScript client: pinecone-io/pinecone-ts-client#144)

Problem

We've been looking at adding custom domains to our documentation references which are hosted via GitHub pages. When applying a custom domain, GitHub modifies the source branch and commits a CNAME file automatically.

See here: https://github.com/pinecone-io/pinecone-ts-client/blob/gh-pages/CNAME

If you're deploying to this branch as a part of CI, you need to handle maintaining the CNAME file. We're currently using the git-publish-subdir-action to achieve this: https://github.com/marketplace/actions/push-git-subdirectory-as-branch. This action blows away everything unless you specify specific files to persist.

Solution

The action we're using supports passing a CLEAR_GLOBS_FILE argument allowing you to control what's replaced and what's persisted: https://github.com/marketplace/actions/push-git-subdirectory-as-branch#custom-clear-operations

  • Add .clear-target-files under .github/. This file tells the action to clear everything but persist the CNAME file.
  • Update merge.yml to pass the file to the action in the merge workflow -> docs deployment step.

Type of Change

  • Infrastructure change (CI configs, etc)

Test Plan

Once this change is merged we can check the gh-pages branch to make sure the CNAME file is not blown away when we regenerate things and push to gh-pages.

@jhamon jhamon deleted the adenoble/docs-deploy-cname branch June 20, 2024 23:14
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.

1 participant