question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: ability to change production branch of Direct Upload Pages project

See original GitHub issue

What version of Wrangler are you using?

cloudflare/wrangler-action@2.0.0

What operating system are you using?

Github Actions / ubuntu-latest

Describe the Bug

Here’s a truncated log where it shows the wrangler command I use, and the output. This happens on the master branch - so I’d expect this to go to the production domain that I have configured in pages project. Instead it deploys to the preview domain

I notice that wrangler CLI allows me to set the production branch if I use it to create a pages project with --production-branch. But in my case I created the project from the web dashboard. So I don’t have a way of telling cloudflare that the production branch is master and to treat commits on that branch as such

  with:
    apiToken: ***
    accountId: ***
    command: pages publish --project-name=conf-makerville ./
...
Using API Token authentication
$ Running: wrangler pages publish --project-name=conf-makerville ./
▲ [WARNING] Warning: Your working directory is a git repo and has uncommitted changes

  To silence this warning, pass in --commit-dirty=true


🌍  Uploading... (8335/8335)

✨ Success! Uploaded 172 files (8[16](https://github.com/Makerville/conference/actions/runs/3050695715/jobs/4918073087#step:4:17)3 already uploaded) (6.48 sec)

✨ Deployment complete! Take a peek over at https://4f10cf4f.conf-makerville.pages.dev/

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
GregBrimblecommented, Sep 21, 2022

Thanks for creating this issue. We’ll log this as a feature request to be able to change the production branch of Direct Upload projects.

1reaction
matheusfillipecommented, Sep 20, 2022

@anujdeshpande I am also struggling with this issue. I am inside a repository but the files i want to publish are not part of the repository, they are the built static files that dont go to version control. I’ve been trying:

npx wrangler pages publish --branch=publish build/html --project-name "my-porject-name"

But doesn’t work. It always ends up as preview. Does my current branch has to be literally called production or what?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How GitLab Permissions and Protected Branches Keep Your ...
Now, if you want to contribute code to a protected branch as a developer, you can simply push your feature branch and create...
Read more >
Source control - Azure Data Factory - Microsoft Learn
Version control systems (also known as source control) let developers collaborate on code and track changes that are made to the code base....
Read more >
Using version control and deploying | Looker - Google Cloud
Create and manage Git branches, commit, and deploy using Git. ... and saved any changes to your LookML project, the IDE may require...
Read more >
Preview deployments · Cloudflare Pages docs
Any additional changes to the development branch will continue to update this 373f31e2.user-example.pages.dev preview address until the ...
Read more >
Express Tutorial Part 7: Deploying to production
Make a few changes to your project settings. ... with a railway project, upload the repository from the local branch to the live...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found