Add repository GitHub Actions for CI, publishing, Pages, and CodeQL#6
Add repository GitHub Actions for CI, publishing, Pages, and CodeQL#6
Conversation
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/ui/sessions/1624ab96-856f-4cc3-a92d-41f681465778
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
Pull request overview
Adds a baseline GitHub Actions setup for the @bquery/ui repo to run CI checks, publish releases to npm, deploy VitePress docs to GitHub Pages, and enable CodeQL scanning.
Changes:
- Add CI workflow to install with Bun, typecheck, test, and build on pushes/PRs.
- Add publish + Pages workflow to build/verify on
main, deploy docs to Pages, and publish to npm on release creation. - Add CodeQL workflow for Actions + JS/TS analysis on pushes/PRs and a scheduled run.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .github/workflows/test.yml | CI workflow using Bun to typecheck, test, and build. |
| .github/workflows/npm-publish.yml | Build/verify, docs build + Pages deploy, and npm publish on release. |
| .github/workflows/codeql.yml | CodeQL configuration for Actions and JS/TS scanning. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| on: | ||
| push: | ||
| branches: | ||
| - '**' | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - development |
There was a problem hiding this comment.
The workflow description says CI should trigger on the main development branches, but push.branches: ['**'] will run on every branch. Consider restricting push to main/development (or removing the branches filter entirely if you truly want all branches) to match the intended behavior and reduce unnecessary CI runs.
| build-docs: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| steps: |
There was a problem hiding this comment.
build-docs and deploy-pages run independently of the main build job, so docs can be deployed even if typecheck/tests/build fail. Consider making build-docs depend on build (or re-running the same verification steps in build-docs) so Pages only deploys from a verified commit.
| with: | ||
| bun-version: '1.3.7' | ||
| - run: bun install --frozen-lockfile | ||
| - run: bun run build:docs |
There was a problem hiding this comment.
VitePress is currently configured with base: '/' (see docs/.vitepress/config.ts), but GitHub Pages for a project repo is typically served under /<repo>/. As-is, the deployed docs are likely to have broken asset and link paths. Consider updating the docs base (or making it conditional for CI) to match the Pages subpath used by this repo.
| - run: bun run build:docs | |
| - run: bun run build:docs | |
| env: | |
| DOCS_BASE: "/${{ github.event.repository.name }}/" |
| jobs: | ||
| analyze: | ||
| name: Analyze (${{ matrix.language }}) | ||
| runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} |
There was a problem hiding this comment.
runs-on uses a template expression that checks for swift, but the matrix only includes actions and javascript-typescript, so the conditional is dead code. Consider simplifying to ubuntu-latest to reduce noise and avoid confusion when maintaining the workflow.
| runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | |
| runs-on: ubuntu-latest |
This PR adds the missing GitHub Actions setup for
bQuery/ui, usingbQuery/bQueryas the reference and adapting it to this repository’s actual scripts and release flow. It introduces a minimal workflow set for CI, npm publishing, GitHub Pages docs deployment, and CodeQL scanning.CI workflow
.github/workflows/test.ymlPublish + docs deployment
.github/workflows/npm-publish.ymlmainCode scanning
.github/workflows/codeql.ymlRepository-specific adaptation
bun install --frozen-lockfile