add RUNNER_TOOL_CACHE env and remove Go and Node modules caching`
All checks were successful
Build and Deploy Hugo Site / buildAndDeploy (push) Successful in 52s

This commit is contained in:
Andreas Hnida 2024-04-18 22:09:34 +02:00
commit 94b6bd402f

View file

@ -7,6 +7,8 @@ on:
jobs:
buildAndDeploy:
env:
RUNNER_TOOL_CACHE: /toolcache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
@ -26,28 +28,12 @@ jobs:
with:
go-version: '1.20.5'
- name: Cache Go modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set up Node.js
uses: actions/setup-node@v4.0.2
with:
node-version: '20'
cache: 'npm'
- name: Cache Node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Setup Project
run: npm run project-setup