Skip to content

build: stop committing dist/, deploy it to Pages from CI - #59

Merged
piotrl merged 1 commit into
masterfrom
claude/dist-pages-ci-8c715c
Nov 3, 2026
Merged

piotrl merged 1 commit into
masterfrom
claude/dist-pages-ci-8c715c

Conversation

@piotrl

@piotrl piotrl commented Nov 3, 2026

Copy link
Copy Markdown
Owner

⚠️ Owner action required before merging

Pages currently runs in legacy mode (Deploy from branch master /). Once dist/ is no longer in git, legacy Pages would serve master without it and break the public embed URL https://piotrl.github.io/github-profile-card/dist/gh-profile-card.min.js.

Safe order:

  1. Repo → Settings → Pages → Build and deployment → Source: GitHub Actions (the github-pages environment is created on first deploy; if it restricts branches, allow master).
  2. Merge this PR → Pages workflow runs on push to master and deploys.
  3. Verify: the embed URL, /demo/, and the README homepage (dinky theme) all load.

If you merge first, switch the source immediately after and run the Pages workflow via Run workflow (workflow_dispatch); the embed is broken until the first deploy completes.

Changes

  • dist/ untracked + gitignored.
  • .github/workflows/pages.yml: npm ci → npm run build → jekyll-build-pages (same _config.yml, theme and README homepage) → asserts _site/dist/gh-profile-card.min.js, _site/demo/, _site/index.html (copies dist in if Jekyll skipped it) → upload-pages-artifact → deploy-pages. Permissions: contents: read, pages: write, id-token: write; concurrency: pages. Action majors checked against latest releases: checkout v7, setup-node v7, configure-pages v6, jekyll-build-pages v1, upload-pages-artifact v5, deploy-pages v5.
  • package.json: "files": ["dist"], prepublishOnly: npm run build.
  • copilot-instructions.md: notes dist is gitignored/CI-built.

Verification

  • npm run build:check passes locally; git status clean after build.
  • Unverified: the workflow itself and the Jekyll step (not run locally; no act). First real run happens after the source switch/merge. Jekyll should copy dist/ since it is a non-underscore dir present in the workspace; the assertion step fails loudly otherwise.

🤖 Generated with Claude Code

…m CI

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@piotrl
piotrl merged commit aba0215 into master Nov 3, 2026
1 check passed
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