chore(deps): update actions/upload-pages-artifact action to v4#931
chore(deps): update actions/upload-pages-artifact action to v4#931ham-renovate wants to merge 1 commit intomainfrom
Conversation
📝 WalkthroughWalkthroughThe Docusaurus workflow build job upgrades the GitHub Pages artifact upload action from v3 to v4. The artifact path and deployment flow remain unchanged, with only the action version updated. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/docusaurus.yml:
- Line 34: The workflow now uses actions/upload-pages-artifact@v4 which excludes
dotfiles (so docs/static/.nojekyll is omitted); fix by either reverting that
step back to actions/upload-pages-artifact@v3, or add a step before the upload
to ensure a visible file named nojekyll is present (e.g., copy
docs/static/.nojekyll into the build output as nojekyll or create an explicit
.nojekyll-preserve and include it), or replace the upload step with a custom
artifact upload that preserves dotfiles per GitHub's validation docs; update the
action reference or add the preservation step accordingly where
actions/upload-pages-artifact@v4 is used.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: edad95b5-f61e-4110-b3a1-772d811eba2f
📒 Files selected for processing (1)
.github/workflows/docusaurus.yml
|
|
||
| - name: Upload Build Artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| uses: actions/upload-pages-artifact@v4 |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
`Please verify from official GitHub Action docs/release notes:
- Does actions/upload-pages-artifact@v4 keep
with: pathbehavior compatible with v3? - Are there any new required inputs, defaults, or breaking changes relevant to this workflow?`
💡 Result:
Yes, actions/upload-pages-artifact@v4 keeps the with: path behavior compatible with v3. The path input remains required with default "_site/", and the action.yml shows it tars the directory from the provided path, passing to actions/upload-artifact@v4.6.2. No new required inputs; same inputs: name (optional, default 'github-pages'), path (required, default '_site/'), retention-days (optional, default '1'). Breaking change: Hidden files (dotfiles) are not included in the artifact by default (due to upstream upload-artifact@v4 behavior and explicit --exclude=".[^/]*" in tar). If dotfiles are needed, create custom artifact per validation docs instead of using this action. No other breaking changes to inputs/defaults relevant to basic workflow usage. Pin upload-artifact to SHA mentioned, but internal. Requires actions/deploy-pages@v4 or newer for deployment.
Citations:
- 1: https://github.com/actions/upload-pages-artifact/releases
- 2: docs: bump
actions/upload-pages-artifactfrom 3 to 4 github/docs#40005 - 3: https://github.com/actions/upload-pages-artifact
- 4: https://github.com/actions/upload-pages-artifact/blob/main/action.yml
- 5: https://github.com/marketplace/actions/upload-github-pages-artifact
🏁 Script executed:
cat -n .github/workflows/docusaurus.ymlRepository: MetaState-Prototype-Project/prototype
Length of output: 1771
🌐 Web query:
Docusaurus build output directory structure dotfiles hidden files necessary deployment
💡 Result:
The Docusaurus build output is generated in the build/ directory after running npm run build (or equivalent with yarn/pnpm/bun). This directory contains all static files necessary for deployment: HTML pages, CSS/JS bundles (in assets/ with content hashes for caching), static assets copied from static/ (preserved at root, including any dotfiles like .nojekyll or CNAME if placed there), and generated directories like _next/ or similar for routes/images depending on configuration. Typical structure (varies by site content, i18n, themes): build/ ├── index.html ├── CNAME (if static/CNAME exists for GitHub Pages custom domains) ├── .nojekyll (common for GitHub Pages to disable Jekyll) ├── assets/ │ ├── js/ (hashed JS bundles, e.g. 123abc.js) │ └── css/ (hashed CSS) ├── / (e.g. docs/, blog/) │ └── index.html └── img/ (processed images from MDX links, hashed) For deployment: - Upload/serve the entire build/ directory contents to your static host (Netlify publish dir: build, GitHub Pages root/gh-pages branch, Vercel, etc.). - No source files (docs/, src/, static/ except via copy) or dev artifacts (.docusaurus, node_modules) are included—only production static files. - Dotfiles/hidden files are necessary if intentionally placed (e.g., static/.nojekyll copies to build/.nojekyll to prevent GitHub Pages Jekyll processing; static/CNAME for custom domains). Docusaurus copies all files from static/ verbatim to build/ root, preserving names including dots/underscores (unless excluded via config). Official docs confirm: "Anything within the static directory will be copied to the root of the build directory." - The project .gitignore ignores build/ entirely during development (not deployed via git typically), confirming it's a clean static output. - Test locally: npm run serve -- --build serves build/ exactly as production. No hidden dev files (e.g. .git) are in build/—it's purely deployable static assets. If custom dotfiles are needed, add to static/.
Citations:
- 1: https://docusaurus.io/docs/3.8.1/deployment
- 2: http://docusaurus.io/docs/3.4.0/deployment
- 3: https://docusaurus.io/docs/deployment
- 4: https://github.com/facebook/docusaurus/blob/main/.gitignore
- 5: https://v2.docusaurus.io/docs/3.4.0/static-assets
- 6: Asset in /static is duplicated in /build (with/without hash) facebook/docusaurus#5362
- 7: https://stackoverflow.com/questions/53080767/docusaurus-cname-file-is-deleted-after-each-build
- 8: https://jaimestill.github.io/docusaur-gh/deploy
🏁 Script executed:
find . -path "*/static/.nojekyll" -o -path "*/static/CNAME" 2>/dev/nullRepository: MetaState-Prototype-Project/prototype
Length of output: 104
Version bump introduces breaking change: dotfiles excluded in v4.
Line 34 upgrades actions/upload-pages-artifact from v3 to v4, but this change has a critical side effect. The v4 action excludes dotfiles (hidden files starting with .) from the artifact by default, due to upstream upload-artifact@v4 behavior using --exclude=".[^/]*".
The project contains docs/static/.nojekyll, which Docusaurus copies to the build output. The .nojekyll file is required by GitHub Pages to disable Jekyll processing. Without it in the artifact, GitHub Pages may process the site incorrectly, breaking the deployment.
To fix this, either:
- Revert to
actions/upload-pages-artifact@v3, or - Use a custom artifact solution per GitHub's validation docs that preserves dotfiles, or
- Manually inject
.nojekyllinto the artifact during the workflow.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/docusaurus.yml at line 34, The workflow now uses
actions/upload-pages-artifact@v4 which excludes dotfiles (so
docs/static/.nojekyll is omitted); fix by either reverting that step back to
actions/upload-pages-artifact@v3, or add a step before the upload to ensure a
visible file named nojekyll is present (e.g., copy docs/static/.nojekyll into
the build output as nojekyll or create an explicit .nojekyll-preserve and
include it), or replace the upload step with a custom artifact upload that
preserves dotfiles per GitHub's validation docs; update the action reference or
add the preservation step accordingly where actions/upload-pages-artifact@v4 is
used.
This PR contains the following updates:
v3→v4Release Notes
actions/upload-pages-artifact (actions/upload-pages-artifact)
v4Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.