Skip to content

build: add CI workflow with production build step#686

Closed
saif-at-scalekit wants to merge 1 commit into
mainfrom
fix/644-ci-add-build-step
Closed

build: add CI workflow with production build step#686
saif-at-scalekit wants to merge 1 commit into
mainfrom
fix/644-ci-add-build-step

Conversation

@saif-at-scalekit
Copy link
Copy Markdown
Collaborator

@saif-at-scalekit saif-at-scalekit commented May 13, 2026

Summary

Adds .github/workflows/ci.yml that runs on every push and PR, including the production build step that was missing from the original PR #635.

Steps in the workflow

  1. Type checkpnpm astro check
  2. Format checkpnpm run format:check
  3. Agent markdown auditnode scripts/agent-markdown-audit.js --strict
  4. Production buildpnpm run build (the key addition from CI: run production build in GitHub Actions (not only local checks) #644)

Uses Node 20 with pnpm caching. The build command matches the documented local build: astro build && node scripts/generate-llms-index.js.

Why

PR #635 was closed without merge. This picks up that work and adds the build step so build regressions are caught before merge.

Closes #644

Summary by CodeRabbit

  • Chores
    • Automated quality assurance: Added continuous integration workflow that validates code formatting, runs audits, and verifies production builds on every commit and pull request to maintain code reliability standards.

Review Change Stack

Add .github/workflows/ci.yml that runs on every push and PR:
- Type check (pnpm astro check)
- Format check (pnpm run format:check)
- Agent markdown audit (--strict)
- Production build (pnpm run build)

This catches build regressions before merge.

Closes #644
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Walkthrough

Added a GitHub Actions CI workflow file (.github/workflows/ci.yml) that automatically runs on all branch pushes and pull requests. The workflow installs dependencies, performs type checking, format validation, strict agent markdown auditing, and executes the production build using Node.js 20 and pnpm with dependency caching.

Changes

GitHub Actions CI Workflow

Layer / File(s) Summary
CI workflow with triggers and job execution
.github/workflows/ci.yml
Workflow triggers on push and pull_request events. Single job runs on Ubuntu 20 with Node.js 20, pnpm caching enabled, and sequential steps: checkout, pnpm install (frozen lockfile), pnpm astro check, pnpm run format:check, strict markdown audit via node scripts/agent-markdown-audit.js --strict, and pnpm run build.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • ravibits
  • amitash1912
  • dhawani
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and concisely describes the main change: adding a CI workflow with a production build step, which is the primary objective.
Linked Issues check ✅ Passed The PR fully meets all acceptance criteria from issue #644: includes production build step after checks, ensures PRs fail on build failure, and matches documented build command.
Out of Scope Changes check ✅ Passed All changes are in-scope: only .github/workflows/ci.yml was added, implementing exactly what issue #644 requested without extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/644-ci-add-build-step
  • 🛠️ fix frontmatter
  • 🛠️ fix internal links

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 3-10: Add an explicit least-privilege permissions block for the
workflow by adding a top-level permissions mapping (noting the existing keys
'on', 'jobs', and job name 'check') that restricts the GITHUB_TOKEN scope—e.g.,
set permissions: contents: read (and packages: read or id-token: write only if
those specific actions require them), or scope down further per-job if needed;
place this top-level 'permissions' key alongside 'on' and 'jobs' to ensure
external actions like actions/checkout@v4, pnpm/action-setup@v4 and
actions/setup-node@v4 run with the minimal required privileges.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4481ba11-4fe0-4cc9-bb6e-ab0a08441551

📥 Commits

Reviewing files that changed from the base of the PR and between 0f8a1f5 and 559d5b6.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/**

⚙️ CodeRabbit configuration file

.github/workflows/**: This is a CI/CD workflow file. Apply these constraints:

  • Do NOT suggest changing --force to --force-with-lease unless
    there is a concrete race condition with parallel trigger sources.
  • Do NOT suggest adding concurrency groups unless the workflow has
    both scheduled and manual triggers on the same branch.
  • Focus on: correct action versions, secret exposure, missing
    permissions blocks, and missing error handling on API calls.
  • Use actionlint findings as the primary source; do not duplicate
    what actionlint already reports.

Files:

  • .github/workflows/ci.yml
🧠 Learnings (1)
📚 Learning: 2026-05-06T07:45:01.683Z
Learnt from: saif-at-scalekit
Repo: scalekit-inc/developer-docs PR: 631
File: .github/workflows/scheduled-deploy.yml:8-12
Timestamp: 2026-05-06T07:45:01.683Z
Learning: In the scalekit-inc/developer-docs repository, for GitHub Actions workflows under .github/workflows that do not use third-party actions, do not run untrusted code, and only perform read API calls plus a Netlify build trigger, it is acceptable to rely on GitHub's default workflow token permissions. Do not flag missing explicit permissions blocks for these minimal-risk workflows. If a workflow includes external actions, uses untrusted code, or requires write permissions beyond netlify hook invocation, require explicit permissions in the YAML and/or CI checks.

Applied to files:

  • .github/workflows/ci.yml
🔇 Additional comments (1)
.github/workflows/ci.yml (1)

21-34: LGTM!

Comment thread .github/workflows/ci.yml
Comment on lines +3 to +10
on:
push:
branches: ['**']
pull_request:

jobs:
check:
runs-on: ubuntu-latest
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

cat .github/workflows/ci.yml

Repository: scalekit-inc/developer-docs

Length of output: 709


Add explicit least-privilege workflow permissions.

The workflow uses external actions (actions/checkout@v4, pnpm/action-setup@v4, actions/setup-node@v4) and should define permissions to restrict GITHUB_TOKEN scope.

🔐 Minimal fix
 on:
   push:
     branches: ['**']
   pull_request:
 
+permissions:
+  contents: read
+
 jobs:
   check:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
on:
push:
branches: ['**']
pull_request:
jobs:
check:
runs-on: ubuntu-latest
on:
push:
branches: ['**']
pull_request:
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 3 - 10, Add an explicit
least-privilege permissions block for the workflow by adding a top-level
permissions mapping (noting the existing keys 'on', 'jobs', and job name
'check') that restricts the GITHUB_TOKEN scope—e.g., set permissions: contents:
read (and packages: read or id-token: write only if those specific actions
require them), or scope down further per-job if needed; place this top-level
'permissions' key alongside 'on' and 'jobs' to ensure external actions like
actions/checkout@v4, pnpm/action-setup@v4 and actions/setup-node@v4 run with the
minimal required privileges.

@saif-at-scalekit
Copy link
Copy Markdown
Collaborator Author

Reverting — will re-approach each issue individually after discussion.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 13, 2026

Deploy Preview for scalekit-starlight ready!

Name Link
🔨 Latest commit 559d5b6
🔍 Latest deploy log https://app.netlify.com/projects/scalekit-starlight/deploys/6a04340c5ff2c700084a79d4
😎 Deploy Preview https://deploy-preview-686--scalekit-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@saif-at-scalekit saif-at-scalekit deleted the fix/644-ci-add-build-step branch May 13, 2026 08:40
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.

CI: run production build in GitHub Actions (not only local checks)

1 participant