Skip to content

Commit 4ba3f3f

Browse files
committed
use the same action with input
1 parent 1773d53 commit 4ba3f3f

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: "Setup Node"
22
description: |
33
Sets up the node environment for tests, builds, etc.
4+
inputs:
5+
directory:
6+
description: |
7+
The directory to run the setup in.
8+
required: false
9+
default: "site"
410
runs:
511
using: "composite"
612
steps:
@@ -10,8 +16,8 @@ runs:
1016
node-version: 16.20.1
1117
# See https://github.com/actions/setup-node#caching-global-packages-data
1218
cache: "yarn"
13-
cache-dependency-path: "site/yarn.lock"
19+
cache-dependency-path: ${{ inputs.directory }}/yarn.lock
1420
- name: Install node_modules
1521
shell: bash
1622
run: ../scripts/yarn_install.sh
17-
working-directory: site
23+
working-directory: ${{ inputs.directory }}

.github/workflows/ci.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -610,11 +610,9 @@ jobs:
610610
uses: actions/checkout@v3
611611

612612
- name: Setup Node
613-
uses: buildjet/setup-node@v3
613+
uses: ./.github/actions/setup-node
614614
with:
615-
node-version: 16.20.1
616-
cache: "yarn"
617-
cache-dependency-path: "offlinedocs/yarn.lock"
615+
directory: offlinedocs
618616

619617
- name: Install dependencies
620618
run: |

0 commit comments

Comments
 (0)