Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docusaurus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: pnpm build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v4
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | πŸ”΄ Critical

🧩 Analysis chain

🌐 Web query:

`Please verify from official GitHub Action docs/release notes:

  • Does actions/upload-pages-artifact@v4 keep with: path behavior 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:


🏁 Script executed:

cat -n .github/workflows/docusaurus.yml

Repository: 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:


🏁 Script executed:

find . -path "*/static/.nojekyll" -o -path "*/static/CNAME" 2>/dev/null

Repository: 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:

  1. Revert to actions/upload-pages-artifact@v3, or
  2. Use a custom artifact solution per GitHub's validation docs that preserves dotfiles, or
  3. Manually inject .nojekyll into 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.

with:
path: docs/build

Expand Down
Loading