From 2c992cba40198e76980310f213c83228b1378938 Mon Sep 17 00:00:00 2001 From: Ivan Kalinichenko Date: Sat, 11 May 2024 16:02:14 +0400 Subject: [PATCH] fixes --- .github/workflows/build-and-deploy.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 95355eb..645543d 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -6,8 +6,8 @@ on: - main jobs: - build: - runs-on: ubuntu-latest + deploy: + runs-on: ubuntu-22.04 steps: - name: Checkout repository @@ -18,14 +18,19 @@ jobs: with: node-version: '20' - - name: Install dependencies - run: npm install + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - - name: Build SPA - run: npm run build + - run: npm ci + - run: npm run build - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4.0.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./dist