Skip to content

Auto-build and open a PR to publish public/ on push to master#31

Open
eudanielhenrique wants to merge 1 commit into
Jurredr:masterfrom
eudanielhenrique:ci/autobuild-public
Open

Auto-build and open a PR to publish public/ on push to master#31
eudanielhenrique wants to merge 1 commit into
Jurredr:masterfrom
eudanielhenrique:ci/autobuild-public

Conversation

@eudanielhenrique

Copy link
Copy Markdown
Contributor

Closes the "Make autobuilder instead of manual build and push" TO-DO item.

Vercel serves the project straight from the committed public/ directory (see vercel.json), so someone has always had to remember to run npm run build and commit the output by hand. That had already gone stale at least once — the synthwave theme was in src/data/themes.ts but never made it into public/src/data/themes.js.

Adds two workflows:

  • ci.yml: runs npm run build on every PR and push, as a check.
  • build.yml: on push to master, builds and, if public/ drifted, opens a PR with the rebuilt output (via peter-evans/create-pull-request) rather than pushing to master directly — a human still reviews and merges it, no standing write access is used to bypass review.

Also, while making the build reproducible in CI:

  • Committed package-lock.json (was gitignored, so every install could silently resolve different transitive dependency versions — this is almost certainly why the build had a persistent, unrelated TS type error locally: an unpinned newer @types/node conflicting with TypeScript's own DOM lib types).
  • Bumped @types/node from a 2021-era ^15.12.1 to ^20.19.43, which resolves that exact conflict — npm run build now completes with zero errors instead of one persistent (if harmless) one.
  • Bumped axios from ^0.21.1 to ^1.18.1. The old version has a long list of high-severity advisories (SSRF, credential leakage via proxy/redirect handling, prototype pollution) and axios is an actual runtime dependency here (fetching the user's avatar and profile data), not just a dev tool. Usage in this codebase is limited to plain axios.get() calls, unaffected by the v0→v1 API changes.

Test plan

  • npm ci && npm run build from a clean node_modules — reproducible, zero errors
  • Verified the compiled widgets still load and execute after the axios/@types/node bump
  • Confirmed the rebuilt public/ now includes the previously-missing synthwave theme

Closes the "Make autobuilder instead of manual build and push" TO-DO
item.

Vercel serves the project straight from the committed public/ directory
(see vercel.json), so someone has always had to remember to run
`npm run build` and commit the output by hand. That already went stale
at least once — the `synthwave` theme was in src/data/themes.ts but
never made it into public/src/data/themes.js.

Adds two workflows:
- ci.yml: runs `npm run build` on every PR and push, as a check.
- build.yml: on push to master, builds and, if public/ drifted, opens a
  PR with the rebuilt output (using peter-evans/create-pull-request)
  rather than pushing to master directly — a human still reviews and
  merges it.

Also, while making the build reproducible in CI:
- Committed package-lock.json (was gitignored, so every install could
  silently resolve different transitive dependency versions — this is
  almost certainly why the build had a persistent, unrelated TS type
  error locally: an unpinned newer @types/node conflicting with
  TypeScript's own DOM lib types).
- Bumped @types/node from a 2021-era ^15.12.1 to ^20.19.43, which
  resolves that exact conflict — `npm run build` now completes with
  zero errors instead of one persistent (if harmless) one.
- Bumped axios from ^0.21.1 to ^1.18.1. The old version has a long
  list of high-severity advisories (SSRF, credential leakage via
  proxy/redirect handling, prototype pollution) and axios is an actual
  runtime dependency here (fetching the user's avatar and profile
  data), not just a dev tool. Usage in this codebase is limited to
  plain axios.get() calls, which are unaffected by the v0->v1 API
  changes.
Copilot AI review requested due to automatic review settings July 14, 2026 13:26
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

@eudanielhenrique is attempting to deploy a commit to the Jurre's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants