setup-node¶
Setup Node
Install Node from .nvmrc and install deps with yarn or npm. Run actions/checkout first.
Inputs¶
Input |
Required |
Default |
Description |
|---|---|---|---|
|
no |
|
Path to the file pinning the Node version. Defaults to .nvmrc at the repo root; point it at a per-side file (e.g. fe/.nvmrc) for monorepo jobs that build one workspace. |
|
no |
|
Package manager for the install step and cache (yarn or npm). yarn runs |
|
no |
|
Whether to cache the package manager’s store (keyed by the resolved lockfile); when on it uses package-manager. Set to “false”/”” to disable – e.g. a monorepo per-side job with no root lockfile, or the pre-bootstrap template that has no committed lockfile yet (setup-node errors if cache is on and no lockfile resolves). |
|
no |
— |
Lockfile that keys the cache. Empty uses setup-node’s default lookup (root yarn.lock / package-lock.json); set e.g. fe/yarn.lock for a per-side job. Ignored when cache is disabled. |
|
no |
|
Install dependencies after setting up Node. |
|
no |
|
Fail instead of updating the lockfile (yarn –frozen-lockfile / npm ci). |
|
no |
|
Directory to run the install in. |
Usage¶
- uses: actions/checkout@v6
- uses: FSHTech/github-actions/setup-node@v1