coder/.github/actions/setup-node/action.yaml

24 lines
652 B
YAML

name: "Setup Node"
description: |
Sets up the node environment for tests, builds, etc.
inputs:
directory:
description: |
The directory to run the setup in.
required: false
default: "site"
runs:
using: "composite"
steps:
- name: Setup Node
uses: buildjet/setup-node@v3
with:
node-version: 18.17.0
# See https://github.com/actions/setup-node#caching-global-packages-data
cache: "yarn"
cache-dependency-path: ${{ inputs.directory }}/yarn.lock
- name: Install node_modules
shell: bash
run: ../scripts/yarn_install.sh
working-directory: ${{ inputs.directory }}