diff --git a/.github/module-cache/action.yaml b/.github/module-cache/action.yaml index 54cc9995..68713cbb 100644 --- a/.github/module-cache/action.yaml +++ b/.github/module-cache/action.yaml @@ -7,21 +7,14 @@ inputs: runs: using: 'composite' steps: - - name: Get pnpm version from package.json - id: get-pnpm-version - run: | - node -e "const p=require('./package.json').packageManager||''; const v=(p.split('@')[1]||'10'); console.log('pnpm-version='+v)" >> $GITHUB_OUTPUT - shell: bash - - name: Install pnpm uses: pnpm/action-setup@v4 - with: - version: ${{ steps.get-pnpm-version.outputs.pnpm-version }} + - name: Setup node uses: actions/setup-node@v5 with: node-version: ${{ inputs.node-version }} - cache: 'pnpm' + - name: Install dependencies run: | pnpm config set auto-install-peers false diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 867cec83..1f9943e7 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -1,6 +1,9 @@ name: Deploy to GitHub Pages on: + pull_request: + branches: + - main push: branches: - main @@ -14,11 +17,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 - - name: Setup pnpm - uses: pnpm/action-setup@v6 - with: - version: 11 - cache: true - name: Setup Node, install dependencies, and cache node modules, build dist artifacts uses: ./.github/build-artifacts with: @@ -26,6 +24,7 @@ jobs: deploy: needs: build + if: github.event_name == 'push' runs-on: ubuntu-latest strategy: matrix: @@ -34,11 +33,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 - - name: Setup pnpm - uses: pnpm/action-setup@v6 - with: - version: 11 - cache: true # Set up GitHub Actions caching for Wireit. # - uses: google/wireit@setup-github-actions-caching/v2