Skip to content

Commit 68ad3a0

Browse files
authored
chore: Update actions on GitHub workflows
1 parent c45f2c8 commit 68ad3a0

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

.github/workflows/deploy.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,23 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v6
1313

14-
- name: Read .nvmrc
15-
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
16-
id: nvm
17-
1814
- name: Setup node
19-
uses: actions/setup-node@v1
15+
uses: actions/setup-node@v6
2016
with:
21-
node-version: '${{ steps.nvm.outputs.NVMRC }}'
22-
registry-url: 'https://registry.npmjs.org'
17+
node-version-file: '.nvmrc'
18+
19+
- name: Get npm cache directory
20+
id: npm-cache-dir
21+
shell: bash
22+
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
2323

2424
- name: Cache node modules
25-
uses: actions/cache@v2
26-
env:
27-
cache-name: cache-node-modules
25+
uses: actions/cache@v4
2826
with:
29-
path: ~/.npm
30-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
27+
path: ${{ steps.npm-cache-dir.outputs.dir }}
28+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
3129
restore-keys: |
32-
${{ runner.os }}-build-${{ env.cache-name }}-
33-
${{ runner.os }}-build-
34-
${{ runner.os }}-
30+
${{ runner.os }}-node-
3531
3632
- name: Install dependencies
3733
run: npm i

0 commit comments

Comments
 (0)