Skip to content

Open source alternative to Semrush and Ahrefs

ci: run pnpm ci in GitHub Actions (#16)

Ben Senescue11c0b05f805
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..87397671
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,38 @@
+name: CI
+
+on:
+ pull_request:
+ push:
+ branches:
+ - main
+
+concurrency:
+ group: ci-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ ci:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ ref: ${{ github.event.pull_request.head.sha || github.sha }}
+
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v4
+ with:
+ version: 9
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: pnpm
+
+ - name: Install dependencies
+ run: pnpm install --frozen-lockfile
+
+ - name: Run CI checks
+ run: pnpm run ci:check
diff --git a/package.json b/package.json
index b29b6286..386c5061 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,7 @@
"db:migrate:local": "wrangler d1 migrations apply DB --local",
"db:migrate:prod": "wrangler d1 migrations apply DB --remote",
"knip": "knip",
- "ci": "prettier --check . && knip && tsc --noEmit && oxlint . --type-aware"
+ "ci:check": "prettier --check . && knip && tsc --noEmit && oxlint . --type-aware"
},
"cloudflare": {
"bindings": {