Skip to content
Open
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
Binary file added .DS_Store
Binary file not shown.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ These inputs use the `@vercel/client` API directly instead of the CLI. They are
| build-env | No | | Build-time environment variables (`KEY=VALUE` per line) |
| regions | No | | Deployment regions, comma-separated (e.g. `iad1,sfo1`) |
| archive | No | | Upload format: `tgz` for compressed archive |
| root-directory | No | | Root directory of the project relative to the repository root |
| root-directory | No | | Root directory of the project relative to the repository root. When set, Vercel builds from this directory instead of the repo root. |
| source-files-outside-root-directory | No | `false` | Set to `true` when source files exist outside the root directory (e.g. monorepos with shared packages). Tells Vercel to look for dependencies beyond the root directory. |
| auto-assign-custom-domains | No | `true` | Automatically assign custom domains to this deployment |
| custom-environment | No | | Custom environment slug or ID |
| public | No | `false` | Make deployment source publicly accessible |
Expand Down Expand Up @@ -449,6 +450,22 @@ These inputs are only available with API-based deployment (when `vercel-args` is
- `custom-environment` — Custom environment slug or ID
- `with-cache` — Retain build cache from previous deployments
- `vercel-output-dir` — Directory containing prebuilt output (only relevant when `prebuilt: true`)
- `source-files-outside-root-directory` — Enable monorepo support (default: `false`)

### Monorepo Example

For monorepos, use `root-directory` to tell Vercel which app to build and `source-files-outside-root-directory` to allow Vercel to resolve dependencies outside the root directory (e.g. shared packages):

```yaml
- uses: amondnet/vercel-action@v42
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.ORG_ID }}
vercel-project-id: ${{ secrets.PROJECT_ID }}
root-directory: apps/web
source-files-outside-root-directory: true
target: production
```

### Deprecated Inputs

Expand Down
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ inputs:
required: false
description: 'Retain build cache from previous deployments (default: false).'
default: 'false'
source-files-outside-root-directory:
required: false
description: 'Indicates if there are source files outside of the root directory, typically used for monorepos (default: false).'
default: 'false'
node-version:
required: false
description: 'Node.js version for the deployment. Must be one of "24.x", "22.x", "20.x". When unset, falls back to package.json engines.node.'
default: ''

outputs:
preview-url:
Expand Down
3 changes: 3 additions & 0 deletions dist/__tests__/helpers.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import type { ActionConfig, DeploymentContext } from '../types';
export declare function createConfig(overrides?: Partial<ActionConfig>): ActionConfig;
export declare function createDeployContext(overrides?: Partial<DeploymentContext>): DeploymentContext;
Loading
Loading