Branch name preview aliases not being created

Hi! I'm running a github actions CI pipeline to create cloudflare preview deployments for every pull request using https://github.com/cloudflare/pages-action. https://developers.cloudflare.com/pages/configuration/preview-deployments/#preview-aliases mentions that preview aliases should be created automatically with the format <branch>.<project>.pages.dev. However I'm not seeing any preview aliases being created except for head.<project>.pages.dev. Otherwise the preview deployments are working fine and are accessible at <hash>.<project>.pages.dev. Could anyone help me figure out why the branch name preview aliases are not being created? Snippet from my github actions workflow file:
- name: Publish preview deploy
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ...
directory: ...
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Publish preview deploy
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ...
directory: ...
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
Cloudflare Docs
Preview deployments · Cloudflare Pages docs
Preview deployments allow you to preview new versions of your project without deploying it to production. To view preview deployments:
2 Replies
rp4428
rp44285mo ago
I see it seems to be due to this bug on the pages-action, https://github.com/cloudflare/pages-action/issues/97
GitHub
The branch parameter is not defaulted to the branch that triggers a...
Based on the documentation, if you omit branch, it should default to the branch for the workflow. I omitted the parameter, but it always reported deployments in the dashboard to master. Passing the...
rp4428
rp44285mo ago
Manually passing in the branch input causes the preview alias to be created, but the github deployment points to the hash URL instead of the branch name URL