Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pages deploy does not deploy to production #337

Open
dapperdandev opened this issue Dec 10, 2024 · 1 comment
Open

pages deploy does not deploy to production #337

dapperdandev opened this issue Dec 10, 2024 · 1 comment

Comments

@dapperdandev
Copy link

I'm trying to deploy to production (not preview). There doesn't seem to be an option to do so.

            - name: Deploy
              uses: cloudflare/wrangler-action@v3
              with:
                  apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
                  accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
                  command: pages deploy dist --project-name=app-${{env.ENV_NAME}}

image

@dapperdandev
Copy link
Author

Found my own solution. HEAD in the screenshot in the original report is the GitHub branch. In this case, it's HEAD because the action was triggered on release creation.

I found the option to change the "production branch" and updated that to rc, since we'll be triggering this action on pull_request to rc.

image
image

I still have a question:

I can pass the --branch=my-branch-name in the command. This doesn't actually change where the code I upload comes from though. It seems to just be a roundabout way of telling CloudFlare Pages to deploy to production or preview. Is that right? Or does CloudFlare have a concept of branches on their end? If so, how do we manage branches in CloudFlare Pages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant