diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 38979184..86dc8c2e 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -22,33 +22,22 @@ jobs: name: Build runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20.x] - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} - - name: Cache Node.js modules - id: cache-npm + node-version: 20.x + cache: "npm" + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Restore Cache uses: actions/cache@v3 - env: - cache-name: cache-npm with: - # npm cache files are stored in `~/.npm` on Linux/macOS path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.os }}-node-${{ 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 - run: npm list - continue-on-error: true + ${{ runner.os }}-node- - name: Install dependencies run: npm install - name: Build @@ -58,7 +47,6 @@ jobs: - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: - name: dist path: dist deploy: @@ -68,12 +56,6 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - name: Download artifact - uses: actions/download-artifact@v2 - with: - name: dist - - name: Setup Pages - uses: actions/configure-pages@v3 - name: Deploy to Github Pages id: deployment uses: actions/deploy-pages@v2 \ No newline at end of file