|
1 | 1 | name: "Dependencies cache" |
2 | | -description: "Action to setup dependencies cache managment." |
| 2 | +description: | |
| 3 | + Action to setup dependencies cache managment. |
| 4 | +
|
| 5 | + ### Supported caches |
| 6 | +
|
| 7 | + - NX (`node_modules/.cache/nx`) |
| 8 | + - Prettier (`node_modules/.cache/prettier`) |
| 9 | + - Docusaurus (`.docusaurus`, `node_modules/.cache/webpack`) |
| 10 | + - Astro (`node_modules/.astro`) |
| 11 | + - Gatsby (`.cache`, `public`) |
| 12 | + - Storybook (`node_modules/.cache/storybook`) |
| 13 | + - Jest (auto-detected `cacheDirectory`) |
| 14 | +
|
3 | 15 | author: hoverkraft |
4 | 16 | branding: |
5 | 17 | icon: archive |
|
54 | 66 | restore-keys: | |
55 | 67 | ${{ runner.os }}-cache-prettier- |
56 | 68 |
|
| 69 | + - name: ♻️ Docusaurus cache |
| 70 | + if: fromJson(steps.has-installed-dependencies.outputs.installed-dependencies).docusaurus == true |
| 71 | + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 |
| 72 | + with: |
| 73 | + path: | |
| 74 | + ${{ inputs.working-directory }}/.docusaurus |
| 75 | + ${{ inputs.working-directory }}/node_modules/.cache/webpack |
| 76 | + key: ${{ runner.os }}-cache-docusaurus-${{ github.sha }} |
| 77 | + restore-keys: | |
| 78 | + ${{ runner.os }}-cache-docusaurus- |
| 79 | +
|
| 80 | + - name: ♻️ Astro cache |
| 81 | + if: fromJson(steps.has-installed-dependencies.outputs.installed-dependencies).astro == true |
| 82 | + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 |
| 83 | + with: |
| 84 | + path: ${{ inputs.working-directory }}/node_modules/.astro |
| 85 | + key: ${{ runner.os }}-cache-astro-${{ github.sha }} |
| 86 | + restore-keys: | |
| 87 | + ${{ runner.os }}-cache-astro- |
| 88 | +
|
57 | 89 | - name: ♻️ Gatsby cache |
58 | 90 | if: fromJson(steps.has-installed-dependencies.outputs.installed-dependencies).gatsby == true |
59 | 91 | uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 |
|
0 commit comments