diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 96754bf..04bbf13 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -31,26 +31,25 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Detect package manager - id: detect-package-manager - run: | - if [ -f "${{ github.workspace }}/yarn.lock" ]; then - echo "manager=yarn" >> $GITHUB_OUTPUT - echo "command=install" >> $GITHUB_OUTPUT - exit 0 - elif [ -f "${{ github.workspace }}/package.json" ]; then - echo "manager=npm" >> $GITHUB_OUTPUT - echo "command=ci" >> $GITHUB_OUTPUT - exit 0 - else - echo "Unable to determine package manager" - exit 1 - fi - name: Setup Node uses: actions/setup-node@v3 with: node-version: "16" - cache: ${{ steps.detect-package-manager.outputs.manager }} + - uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Setup Pages uses: actions/configure-pages@v3 with: @@ -69,9 +68,9 @@ jobs: restore-keys: | ${{ runner.os }}-nuxt-build- - name: Install dependencies - run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} + run: pnpm install - name: Static HTML export with Nuxt - run: ${{ steps.detect-package-manager.outputs.manager }} run generate + run: pnpm run generate - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: