Skip to content

ci(pages): add Pages CI workflow for typecheck and build#442

Merged
lizhengfeng101 merged 1 commit into
mainfrom
ci/pages-typecheck-build
Jul 22, 2026
Merged

ci(pages): add Pages CI workflow for typecheck and build#442
lizhengfeng101 merged 1 commit into
mainfrom
ci/pages-typecheck-build

Conversation

@lizhengfeng101

Copy link
Copy Markdown
Collaborator

What

Adds a new .github/workflows/pages-ci.yml workflow that runs on pull requests touching pages/**. The job installs dependencies with npm ci and runs typecheck followed by build.

Why

The pages/ frontend previously had no PR-level quality gating. The only existing workflow, deploy-pages.yml, runs solely on push to main (build + deploy), so type errors and build breakages were only surfaced after merge.

This workflow closes that gap by validating the frontend at PR time, reusing the already-present typecheck script (tsc --noEmit) that was defined in package.json but never wired into CI.

Details

  • Triggers only on pull_request to main with a paths: ['pages/**'] filter, so unrelated changes don't run it.
  • Uses npm ci for reproducible, lockfile-pinned installs.
  • Mirrors conventions from existing workflows (self-hosted runner, node:24 container, Trust workspace step, concurrency with cancel-in-progress, timeout-minutes).
  • Leaves deploy-pages.yml untouched — this workflow handles quality gating, deploy handles publishing.

Scope

This is the first of a planned, incremental rollout of frontend quality gating. Lint/format (ESLint + Prettier) and unit tests (Vitest) are deferred to follow-up PRs.

Add a Pages CI GitHub Actions workflow that runs on pull requests
touching pages/**, performing npm ci, typecheck, and build. This
provides quality gating for the frontend, which previously had no
PR-level checks (deploy-pages.yml only ran on push to main).
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

🔍 OpenCodeReview found 1 issue(s) in this PR.

  • ✅ Successfully posted inline: 1 comment(s)

Comment on lines +28 to +30
- name: Install dependencies
working-directory: pages
run: npm ci

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.

Dependencies are installed via npm ci on every run without any caching. This wastes time and network bandwidth, especially on self-hosted runners. Consider adding caching using actions/cache or the built-in caching in setup-node.

Example:

- uses: actions/setup-node@v4
  with:
    node-version: '24'
    cache: 'npm'
    cache-dependency-path: pages/package-lock.json

This would replace the container-based Node setup and provide automatic npm caching.

@lizhengfeng101
lizhengfeng101 merged commit c62c4ae into main Jul 22, 2026
12 checks passed
@lizhengfeng101
lizhengfeng101 deleted the ci/pages-typecheck-build branch July 22, 2026 05:03
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