2023-06-01 08:20:49 +00:00
|
|
|
name: "Setup Node"
|
|
|
|
description: |
|
|
|
|
Sets up the node environment for tests, builds, etc.
|
2023-07-24 10:54:08 +00:00
|
|
|
inputs:
|
|
|
|
directory:
|
|
|
|
description: |
|
|
|
|
The directory to run the setup in.
|
|
|
|
required: false
|
|
|
|
default: "site"
|
2023-06-01 08:20:49 +00:00
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
2023-08-02 18:28:16 +00:00
|
|
|
- name: Install pnpm
|
|
|
|
uses: pnpm/action-setup@v2
|
|
|
|
with:
|
|
|
|
version: 8
|
2023-07-13 19:46:18 +00:00
|
|
|
- name: Setup Node
|
|
|
|
uses: buildjet/setup-node@v3
|
2023-06-01 08:20:49 +00:00
|
|
|
with:
|
2023-07-27 20:54:38 +00:00
|
|
|
node-version: 18.17.0
|
2023-06-01 08:20:49 +00:00
|
|
|
# See https://github.com/actions/setup-node#caching-global-packages-data
|
2023-08-02 18:28:16 +00:00
|
|
|
cache: "pnpm"
|
|
|
|
cache-dependency-path: ${{ inputs.directory }}/pnpm-lock.yaml
|
|
|
|
- name: Install root node_modules
|
|
|
|
shell: bash
|
|
|
|
run: ./scripts/pnpm_install.sh
|
|
|
|
|
2023-06-01 08:20:49 +00:00
|
|
|
- name: Install node_modules
|
|
|
|
shell: bash
|
2023-08-02 18:28:16 +00:00
|
|
|
run: ../scripts/pnpm_install.sh
|
2023-07-24 10:54:08 +00:00
|
|
|
working-directory: ${{ inputs.directory }}
|