Deploy godoc pages via Pages artifact instead of gh-pages branch - #4699
Closed
jack-edmonds-dd wants to merge 1 commit into
Closed
jack-edmonds-dd wants to merge 1 commit into
jack-edmonds-dd wants to merge 1 commit into
Conversation
The datadogV2 package renders to a single index.html that is now within ~170 KB of git's 100 MiB per-file limit, and DataDog/datadog-api-spec#6828 pushes it over. Deploying with actions/upload-pages-artifact and actions/deploy-pages avoids git entirely, so the 100 MiB guard is no longer needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Duplicate of #4694 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
Changes the
docsworkflow to deploy godoc pages withactions/upload-pages-artifact+actions/deploy-pages. Previouslypeaceiris/actions-gh-pagespusheddist/to thegh-pagesbranch.gopages renders the whole
api/datadogV2package into a singleindex.html. On the currentgh-pagesbranch that file is 104,684,323 bytes, which is ~170 KB under git's 100 MiB per-file push limit. DataDog/datadog-api-spec#6828 (stable Experiments v2 APIs) brings it to ~110 MB, so the existing-size +100Mguard fails on #4668.The 100 MiB limit only applies to git pushes. To check that Pages serves larger files when deployed as an artifact, I set up a throwaway repo and deployed a 110,426,709-byte HTML file with these actions. It was served with
HTTP 200, fullcontent-length, and a matching SHA-256. The documented Pages limits are 1 GB for the whole site and a 10-minute deploy timeout.Changes:
buildjob, which runs on PRs and pushes, and adeployjob, which runs only on push tomaster.-size +100Mguard.contents: write. The workflow now needscontents: readpluspages: write/id-token: write, and only the deploy job gets those.Additional Notes
Repo admin action required before merging. Otherwise the first deploy from
masterwill fail. The current site stays up until then.gh-pages) to GitHub Actions.github-pages: the deployment branch policy currently allows onlygh-pages. Addmaster.After the first successful deploy, the
gh-pagesbranch is no longer used and can be deleted.Review checklist
This PR includes all newly recorded cassettes for any modified tests.
This PR does not rely on API client schema changes.
Or, this PR relies on API schema changes and this is a Draft PR to include tests for that new functionality.
🤖 Generated with Claude Code