Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,28 @@ jobs:
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.15.0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: pnpm

- name: Install commitlint
run: |
npm install --save-dev @commitlint/config-conventional @commitlint/cli
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Validate PR title
run: |
echo "${{ github.event.pull_request.title }}" | npx commitlint
echo "${{ github.event.pull_request.title }}" | pnpm exec commitlint

- name: Validate commits
if: github.event.pull_request.commits > 1
run: |
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
pnpm exec commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

lint:
name: Lint
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/example-angular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
- uses: pnpm/action-setup@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
version: 10.15.0

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: build
run: |
cd example/angular
npm ci
npx ng build --prod
pnpm install --frozen-lockfile
pnpm exec ng build --prod

- uses: ./
id: vercel-action-staging
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/example-nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.15.0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- run: |
npm ci
npx vercel pull --yes --token=${VERCEL_TOKEN}
pnpm install --frozen-lockfile
pnpm exec vercel pull --yes --token=${VERCEL_TOKEN}
working-directory: example/nextjs
env:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_NEXTJS }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
- run: |
npx vercel build
pnpm exec vercel build
if: github.event_name == 'pull_request_target'
working-directory: example/nextjs
env:
Expand Down Expand Up @@ -51,7 +63,7 @@ jobs:
env:
REF: ${{ github.ref }}
- run: |
npx vercel build --prod
pnpm exec vercel build --prod
if: github.event_name == 'push'
working-directory: example/nextjs
env:
Expand Down
21 changes: 12 additions & 9 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,27 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

This is a GitHub Action that deploys projects to Vercel. It's an npm package that integrates with GitHub workflows to automate deployments, providing more control than Vercel's native GitHub integration.
This is a GitHub Action that deploys projects to Vercel. It's a pnpm-based package that integrates with GitHub workflows to automate deployments, providing more control than Vercel's native GitHub integration.

## Package Manager

This project uses **pnpm** as its package manager. The project is configured as a monorepo with workspaces for the example projects. Make sure to use pnpm commands instead of npm.

## Essential Commands

### Development
```bash
npm install # Install dependencies
npm start # Run the action locally (node ./index.js)
npm run lint # Run ESLint on index.js
npm run format # Format code with Prettier
npm run format-check # Check code formatting
npm test # Run Jest tests
npm run all # Run format, lint, package, and test in sequence
pnpm install # Install dependencies
pnpm start # Run the action locally (node ./index.js)
pnpm run lint # Run ESLint
pnpm run lint:fix # Run ESLint and fix issues
pnpm test # Run Jest tests
pnpm run all # Run lint, package, and test in sequence
```

### Building for Distribution
```bash
npm run package # Build the action with ncc (outputs to dist/)
pnpm run package # Build the action with ncc (outputs to dist/)
```

**Important**: The `dist/` folder must be committed when creating releases. This contains the bundled action code that GitHub Actions will execute.
Expand Down
2 changes: 1 addition & 1 deletion DEVELOP.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Package

```bash
npm run package
pnpm run package
```

# Release
Expand Down
Loading
Loading