diff --git a/.github/workflows/deploy-stage.yaml b/.github/workflows/deploy-stage.yaml index 8a924b6..44156d6 100644 --- a/.github/workflows/deploy-stage.yaml +++ b/.github/workflows/deploy-stage.yaml @@ -11,22 +11,40 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - - name: Set up Node.js - uses: actions/setup-node@v2 + - name: Install Node.js + uses: actions/setup-node@v3 with: - node-version: '16' - cache: 'npm' + node-version: 16 - - name: Install Dependencies - run: npm install + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup pnpm cache + uses: actions/cache@v3 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install - name: Build Static Content - run: npm run build + run: pnpm run build - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@4.1.4 + uses: JamesIves/github-pages-deploy-action@v4 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages