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
11 changes: 11 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"permissions": {
"allow": [
"mcp__github__get_pull_request_files",
"mcp__github__get_pull_request_comments",
"mcp__github__get_pull_request"
],
"deny": [],
"ask": []
}
}
15 changes: 0 additions & 15 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

github: [amondnet]
patreon: amond
open_collective: #amond
open_collective: # amond
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: CI

on:
push:
branches: [master, main]
pull_request:
branches: [master, main]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

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

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

- name: Install dependencies
run: pnpm install

- name: Run ESLint
run: pnpm run lint

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

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

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

- name: Install dependencies
run: pnpm install

- name: Run tests
run: pnpm test

build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

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

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

- name: Install dependencies
run: pnpm install

- name: Build distribution
run: pnpm run package

- name: Verify dist folder exists
run: |
if [ ! -d "dist" ]; then
echo "Error: dist folder was not created"
exit 1
fi
echo "dist folder created successfully"
ls -la dist/
9 changes: 4 additions & 5 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -43,12 +43,11 @@ jobs:
- Performance considerations
- Security concerns
- Test coverage

Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.

Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.

# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://docs.anthropic.com/en/docs/claude-code/sdk#command-line for available options
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'

3 changes: 1 addition & 2 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read
Expand All @@ -47,4 +47,3 @@ jobs:
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://docs.anthropic.com/en/docs/claude-code/sdk#command-line for available options
# claude_args: '--model claude-opus-4-1-20250805 --allowed-tools Bash(gh pr:*)'

3 changes: 1 addition & 2 deletions .github/workflows/example-express-basic-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
- master
pull_request_target:


jobs:
basic-auth:
runs-on: ubuntu-latest
Expand All @@ -28,5 +27,5 @@ jobs:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_AUTH }}
vercel-args: '--prod'
vercel-args: --prod
working-directory: example/express-basic-auth
4 changes: 1 addition & 3 deletions .github/workflows/example-scope.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
- master
pull_request_target:



jobs:
static:
runs-on: ubuntu-latest
Expand All @@ -30,6 +28,6 @@ jobs:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID_TEAM_SCOPE }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_TEAM_SCOPE }}
vercel-args: '--prod'
vercel-args: --prod
scope: ${{ secrets.VERCEL_SCOPE }}
working-directory: example/team-scope
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
- master
pull_request_target:


jobs:
deploy:
runs-on: ubuntu-latest
Expand Down
8 changes: 0 additions & 8 deletions .prettierrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ npm run package # Build the action with ncc (outputs to dist/)
2. **Project Linking**: The `.vercel/` directory with org/project IDs must be committed
3. **Build Process**: Builds should happen in GitHub Actions, not Vercel
4. **Backward Compatibility**: Maintain support for deprecated "zeit-" prefixed inputs
5. **Error Handling**: Use proper exit codes and clear error messages for CI/CD integration
5. **Error Handling**: Use proper exit codes and clear error messages for CI/CD integration
2 changes: 0 additions & 2 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ git add dist
git tag --new-release
```


# Changelog

```bash
github_changelog_generator
```

59 changes: 25 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
![example - basic auth](https://github.com/amondnet/vercel-action/workflows/example%20-%20basic%20auth/badge.svg)
![example - angular](https://github.com/amondnet/vercel-action/workflows/example%20-%20angular/badge.svg)

![stars](https://badgen.net/github/stars/amondnet/vercel-action)
![forks](https://badgen.net/github/forks/amondnet/vercel-action)
![stars](https://badgen.net/github/stars/amondnet/vercel-action)
![forks](https://badgen.net/github/forks/amondnet/vercel-action)
![HitCount](http://hits.dwyl.com/amondnet/vercel-action.svg)

[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=amondnet_vercel-action&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=amondnet_vercel-action)
Expand All @@ -18,12 +18,12 @@
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=amondnet_vercel-action&metric=security_rating)](https://sonarcloud.io/dashboard?id=amondnet_vercel-action)

This action was formerly [Zeit Now Deployment](https://github.com/marketplace/actions/zeit-now-deployment). [Migration Guide](#migration-from-v2)
![stars](https://badgen.net/github/stars/amondnet/now-deployment) ![forks](https://badgen.net/github/forks/amondnet/now-deployment)
![stars](https://badgen.net/github/stars/amondnet/now-deployment) ![forks](https://badgen.net/github/forks/amondnet/now-deployment)

## Introduction to Vercel
Vercel is a cloud platform for **static sites** and **Serverless Functions** that fits perfectly with your workflow. It enables developers to host **Jamstack** websites and web services that **deploy instantly**, **scale automatically**, and requires **no supervision**, all with **no configuration**.
Vercel is a cloud platform for **static sites** and **Serverless Functions** that fits perfectly with your workflow. It enables developers to host **Jamstack** websites and web services that **deploy instantly**, **scale automatically**, and requires **no supervision**, all with **no configuration**.

This action make a Vercel deployment with github actions.
This action make a Vercel deployment with github actions.

- [x] Deploy to Vercel.
- [x] Comment on pull request.
Expand All @@ -50,8 +50,8 @@ This action make a Vercel deployment with github actions.
| vercel-org-id | <ul><li>- [x] </li></ol> | | ❗Vercel CLI 17+,The `name` property in vercel.json is deprecated (https://zeit.ink/5F) |
| vercel-args | <ul><li>- [ ] </li></ol> | | This is optional args for `vercel` cli. Example: `--prod` |
| working-directory | <ul><li>- [ ] </li></ol> | | the working directory |
| scope | <ul><li>- [ ] </li></ol> | | If you are working in a team scope, you should set this value to your `team ID`.
| alias-domains | <ul><li>- [ ] </li></ol> | | You can assign a domain to this deployment. Please note that this domain must have been configured in the project. You can use pull request number via `{{PR_NUMBER}}` and branch via `{{BRANCH}}`.
| scope | <ul><li>- [ ] </li></ol> | | If you are working in a team scope, you should set this value to your `team ID`.
| alias-domains | <ul><li>- [ ] </li></ol> | | You can assign a domain to this deployment. Please note that this domain must have been configured in the project. You can use pull request number via `{{PR_NUMBER}}` and branch via `{{BRANCH}}`.
| vercel-project-name | <ul><li>- [ ] </li></ol> | | The name of the project; if absent we'll use the `vercel inspect` command to determine. [#27](https://github.com/amondnet/vercel-action/issues/27) & [#28](https://github.com/amondnet/vercel-action/issues/28)
| vercel-version | <ul><li>- [x] </li></ol> | | vercel-cli package version if absent we will use one declared in [package.json](https://github.com/amondnet/vercel-action/blob/master/package.json)
## Outputs
Expand All @@ -71,7 +71,7 @@ The name of deployment name.
> The Vercel for GitHub integration automatically deploys your GitHub projects with Vercel, providing Preview Deployment URLs, and automatic Custom Domain updates.
[link](https://vercel.com/docs/v2/git-integrations)

We would like to to use `github actions` for build and deploy instead of `Vercel`.
We would like to to use `github actions` for build and deploy instead of `Vercel`.

Set `github.enabled: false` in `vercel.json`, see example `vercel.json` file below:

Expand All @@ -83,7 +83,6 @@ Set `github.enabled: false` in `vercel.json`, see example `vercel.json` file bel
"enabled": false
}
}

```
When `github.enabled` set to `false`, `Vercel for GitHub` will not deploy the given project regardless of the GitHub app being installed.

Expand Down Expand Up @@ -115,7 +114,6 @@ Set `builds` to `@vercel/static` to skip vercel's build step. `src` is the path

See [docs](https://vercel.com/docs/cli#legacy/builds) for more details


### Project Linking

You should link a project via [Vercel CLI](https://vercel.com/download) in locally.
Expand All @@ -139,7 +137,7 @@ vercel
Once set up, a new `.vercel` directory will be added to your directory. The `.vercel` directory contains both the organization(`vercel-org-id`) and project(`vercel-project-id`) id of your project.

```json
{"orgId":"example_org_id","projectId":"example_project_id"}
{ "orgId": "example_org_id", "projectId": "example_project_id" }
```

You can save both values in the secrets setting in your repository. Read the [Official documentation](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) if you want further info on how secrets work on Github.
Expand All @@ -161,21 +159,19 @@ jobs:
# your build commands
# - run: |
# ng build --prod
- uses: amondnet/vercel-action@v25 #deploy
- uses: amondnet/vercel-action@v25 # deploy
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
vercel-args: '--prod' #Optional
vercel-org-id: ${{ secrets.ORG_ID}} #Required
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
github-token: ${{ secrets.GITHUB_TOKEN }} # Optional
vercel-args: --prod # Optional
vercel-org-id: ${{ secrets.ORG_ID}} # Required
vercel-project-id: ${{ secrets.PROJECT_ID}} # Required
working-directory: ./sub-directory
```


### Angular Example

See [.github/workflows/example-angular.yml](/.github/workflows/example-angular.yml) ,

See [.github/workflows/example-angular.yml](/.github/workflows/example-angular.yml) ,

### Basic Auth Example

Expand All @@ -195,7 +191,7 @@ If you want to assign domain to branch or pr, you should add [Wildcard Domain](h

You can use pull request number via `{{PR_NUMBER}}` and branch via `{{BRANCH}}`

#### Example
#### Example

Wildcard Domains : *.angular.vercel-action.amond.dev

Expand All @@ -214,9 +210,7 @@ https://{{BRANCH}}.angular.vercel-action.amond.dev
- master -> https://master.angular.vercel-action.amond.dev
- master -> https://master.angular.vercel-action.amond.dev



See [.github/workflows/example-angular.yml](/.github/workflows/example-angular.yml)
See [.github/workflows/example-angular.yml](/.github/workflows/example-angular.yml)

```yaml
name: deploy website
Expand All @@ -229,27 +223,24 @@ jobs:
- uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
github-token: ${{ secrets.GITHUB_TOKEN }} #Optional
vercel-args: '--prod' #Optional
vercel-org-id: ${{ secrets.ORG_ID}} #Required
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
working-directory: ./sub-directory #Your Working Directory, Optional
alias-domains: | #Optional
github-token: ${{ secrets.GITHUB_TOKEN }} # Optional
vercel-args: --prod # Optional
vercel-org-id: ${{ secrets.ORG_ID}} # Required
vercel-project-id: ${{ secrets.PROJECT_ID}} # Required
working-directory: ./sub-directory # Your Working Directory, Optional
alias-domains: | # Optional
staging.angular.vercel-action.amond.dev
pr-{{PR_NUMBER}}.angular.vercel-action.amond.dev
```



## Migration from v2

1. Change action name in `workflows` from `now-deployment` to `vercel-action`
```yaml
- name: Vercel Action
uses: amondnet/vercel-action@v25
- name: Vercel Action
uses: amondnet/vercel-action@v25
```
2. Change input values.
- `zeit-token` -> `vercel-token`
- `now-org-id` -> `vercel-org-id`
- `now-project-id` -> `vercel-project-id`

Loading
Loading