diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f8018b0..071c59f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,6 +3,7 @@ name: Deploy site to GitHub Pages on: push: branches: [main] + pull_request: workflow_dispatch: permissions: @@ -10,10 +11,6 @@ permissions: pages: write id-token: write -concurrency: - group: pages - cancel-in-progress: true - jobs: build: runs-on: ubuntu-latest @@ -34,13 +31,18 @@ jobs: run: npm run build - name: Upload Pages artifact + if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: actions/upload-pages-artifact@v5 with: path: ./dist deploy: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' needs: build runs-on: ubuntu-latest + concurrency: + group: pages + cancel-in-progress: true environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }}