From 2a73ffd5ec892ecdfc75ca218afcee43f33f63a0 Mon Sep 17 00:00:00 2001 From: eksqtr Date: Sun, 25 Aug 2024 19:13:13 +0800 Subject: [PATCH] Attempting to implement nextjs cache on deployment pipeline --- .github/workflows/deploy.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f0fa6bb..f050d65 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,6 +18,22 @@ jobs: - name: Checkout source code uses: actions/checkout@v3 + - name: Set up cache for node_modules + uses: actions/cache@v4 + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Set up cache for .next + uses: actions/cache@v4 + with: + path: .next/cache + key: ${{ runner.os }}-next-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.os }}-next- + - name: Setting up NodeJS Environment uses: actions/setup-node@v3 with: