diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5ce0abd..6bef430 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,6 +3,8 @@ name: Build and Deploy on: push: branches: [main] + pull_request: + branches: [main] workflow_dispatch: permissions: @@ -11,7 +13,7 @@ permissions: id-token: write concurrency: - group: "pages" + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: @@ -56,16 +58,19 @@ jobs: run: make wasm - name: Setup Pages + if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') uses: actions/configure-pages@v5 with: enablement: true - name: Upload artifact + if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') uses: actions/upload-pages-artifact@v4 with: path: 'web' deploy: + if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }}