A composite GitHub action to setup Node.js, configure Yarn, and install dependencies for the Adobe Commerce DevSite projects based on Gatsby.
This action streamlines the setup process for Node.js projects by:
- Setting up Node.js using a version file (
.nvmrc) - Configuring Yarn caching for faster CI/CD workflows
- Enabling Corepack for Yarn package manager
- Installing project dependencies with
yarn install
Required: Yes
Path to the .nvmrc file that specifies the Node.js version to use.
Example: .nvmrc
Required: Yes
Path to the yarn.lock file for dependency caching.
Example: yarn.lock
- name: Setup Node.js and install dependencies
uses: commerce-docs/devsite-install-action@main
with:
node-version-file: '.nvmrc'
cache-dependency-path: 'yarn.lock'For monorepos with multiple yarn.lock files:
- name: Setup Node.js and install dependencies
uses: commerce-docs/devsite-install-action@main
with:
node-version-file: '.nvmrc'
cache-dependency-path: 'yarn.lock'- Setup Node.js - Configures the Node.js environment using
actions/setup-node@v6with the version specified in your.nvmrcfile - Enable Yarn caching - Sets up dependency caching to speed up subsequent workflow runs
- Enable Corepack - Activates Corepack to manage the Yarn package manager
- Install dependencies - Runs
yarn installwith immutable installs disabled
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.