Skip to content

Commit 9374039

Browse files
committed
fix(npm): cache
1 parent 6d45b23 commit 9374039

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

action.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,21 @@ runs:
3232
bundler-cache: true
3333
working-directory: ${{ github.action_path }}
3434

35+
# We need to copy md2pdfup's package-lock.json into the workspace
36+
# because hashFiles only works on files inside the workspace.
37+
- run: cp ${{ github.action_path }}/package-lock.json md2pdfup-package-lock.json
38+
shell: bash
39+
3540
- uses: actions/setup-node@v4
3641
with:
3742
node-version: "20.x"
3843
cache: "npm"
39-
cache-dependency-path: "${{ github.action_path }}/package-lock.json"
44+
cache-dependency-path: '**/md2pdfup-package-lock.json'
45+
46+
- uses: actions/cache@v4
47+
with:
48+
path: ${{ github.action_path }}/node_modules
49+
key: md2pdfup-npm-${{ hashFiles('md2pdfup-package-lock.json') }}
4050

4151
- run: |
4252
npm install

0 commit comments

Comments
 (0)