Rebuild CI/CD: lint/build/audit gate + native Pages deployment - #9
Merged
Conversation
eslint-config-vuetify@1.0.0 unconditionally extends @vue/eslint-config-typescript, which wasn't declared as a dependency anywhere, so `npm run lint` failed outright. Added it (v13, the last major compatible with our ESLint 8.57 / eslint-plugin-vue 9.27), then fixed the real violations it surfaced: missing v-for keys across AppHeader/AboutMe/Projects/index, an unintentional-looking assignment in a while condition in glossary.js, and unused loop-index vars. Also ignore the auto-generated auto-imports.d.ts/components.d.ts (regenerated on every build) and commit typed-router.d.ts, per unplugin-vue-router's own recommendation.
npm audit fix cleared 13 of 15 reported vulnerabilities (ajv, brace-expansion, nanoid, picomatch, postcss, rollup, yaml and their dependents). The remaining 2 (esbuild moderate + vite high, GHSA-67mh-4wv8-2f99) have no fix available without a major vite 5->8 upgrade across several vite-plugin-* devDependencies, and only affect the local `vite dev` server, not the production build or deployed site. Accepted for now; CI's audit gate targets --audit-level=critical rather than high to reflect this.
Rebuilds automated CI/CD after the previous workflow was deleted. On every push/PR to main: install, lint, build, and npm audit (--audit-level=critical, since the one remaining unfixed advisory is a dev-server-only issue with no fix available yet - see prior commit). On push to main only, also builds the Pages artifact (with CNAME and .nojekyll) and deploys it via actions/deploy-pages. This replaces the old gh-pages-branch deploy (npm run deploy) with GitHub's native Actions-based Pages deployment; the repo's Pages source setting has been switched from "legacy" (gh-pages branch) to "workflow" accordingly. The gh-pages branch and the deploy/predeploy npm scripts are left in place as an unused manual fallback.
3 tasks
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.
Summary
eslint-config-vuetifyextends@vue/eslint-config-typescript, which wasn't installed, sonpm run lintfailed outright. Added it (pinned to v13, the last major compatible with our ESLint 8 setup) and fixed the real violations it surfaced (missingv-forkeys, an unparenthesized assignment-as-condition inglossary.js, unused loop vars).npm audit fixcleared 13 of 15 vulnerabilities. The remaining 2 (esbuild/vite, GHSA-67mh-4wv8-2f99) have no fix without a major vite 5→8 upgrade and only affect the local dev server, not the deployed site — accepted for now..github/workflows/ci-cd.yml:main: install, lint, build,npm audit --audit-level=critical.mainonly: also builds the Pages artifact (withCNAME/.nojekyll) and deploys viaactions/deploy-pages.gh-pages-branch deploys to native GitHub Actions deployment (build_type: workflow) via the Pages API. Thegh-pagesbranch andnpm run deploy/predeployscripts are left in place, unused, as a manual fallback..gitignorenow excludes the auto-generatedauto-imports.d.ts/components.d.ts;typed-router.d.tsis now committed perunplugin-vue-router's own recommendation.Test plan
npm run lintpassesnpm run buildpassesnpm audit --audit-level=criticalpasses (0 critical vulnerabilities)buildjob should go green on GitHub Actions (exercises the PR-trigger path, no deploy)deployjob runs and https://sillyash.com serves the new build