Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
16 changes: 8 additions & 8 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ This is a GitHub Action that deploys projects to Vercel. It's an npm package tha

### 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 on index.js
pnpm run format # Format code with Prettier
pnpm run format-check # Check code formatting

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.

medium

The format and format-check scripts are referenced here but are not defined in the scripts section of package.json. This will lead to an error if a developer tries to run them. Please either add these scripts to package.json (and the prettier dev dependency if needed) or remove these lines from the documentation.

pnpm test # Run Jest tests
pnpm run all # Run format, 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