From 4e11a15dbc2cf57bbcf30a803834555bbc8803f8 Mon Sep 17 00:00:00 2001 From: Fingertips Date: Sun, 19 Jan 2025 11:59:54 +0800 Subject: [PATCH] cd: clean install dependencies --- .github/workflows/deploy.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index bda965e..2729e71 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -12,6 +12,16 @@ jobs: - name: Checkout Code uses: actions/checkout@v4 + - name: Cache Node Modules + uses: actions/cache@v4 + with: + path: | + ~/.npm + node_modules + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Download Build Artifact uses: dawidd6/action-download-artifact@v7 with: @@ -32,8 +42,8 @@ jobs: with: node-version: latest - - name: Install gh-pages - run: npm install gh-pages + - name: Install Dependencies + run: npm ci --cache .npm --prefer-offline - name: Deploy to GitHub Pages - run: gh-pages -d dist --repo https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/Fingertips18/fingertips18.github.io.git + run: npx gh-pages -d dist --repo https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/Fingertips18/fingertips18.github.io.git