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 }}
- 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
5 Replies
NullVoxPopuli
NullVoxPopuliOP8mo ago
oh! it's just branch related need to test oh, why do my sha's not match?
NullVoxPopuli
NullVoxPopuliOP8mo ago
No description
NullVoxPopuli
NullVoxPopuliOP8mo ago
the sha from CF doesn't match the commit-hash
NullVoxPopuli
NullVoxPopuliOP8mo ago
Confirm
Want results from more Discord servers?
Add your server