how do you tell wrangler to do a preview deploy?

I have this code so far:
      - name: Preview ${{ matrix.app.name }}
        working-directory: ./deploy-prep-dist/${{ matrix.app.path }}
        run: |
          npx wrangler pages deploy ./ \
            --project-name=${{ matrix.app.cloudflareName }} \
            --branch=${{ github.event.workflow_run.head_branch }} \
            --commit-hash=${{ github.event.workflow_run.head_commit }}
        env:
          CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
          CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

but it deploys over my production deployment
Was this page helpful?