From 59fec1cb990c7f592e36fa18cbd0f422dbd8abe3 Mon Sep 17 00:00:00 2001 From: Peaceultime Date: Thu, 14 Dec 2023 23:31:48 +0000 Subject: [PATCH] Update .github/workflows/deploy.yml --- .github/workflows/deploy.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 84d5e94..bfbd8ea 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,6 +22,25 @@ jobs: github-server-url: 'https://github.com' token: ${{ secrets.GH_PAT }} + - name: Cache node modules + id: cache-npm + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} + name: List the state of node modules + continue-on-error: true + run: npm list + - name: "Checkout" uses: actions/checkout@v3 with: @@ -39,4 +58,9 @@ jobs: - name: Build Quartz run: npx quartz build - working-directory: ./quartz \ No newline at end of file + working-directory: ./quartz + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: ./quartz/public \ No newline at end of file