WeWeb’s GitHub publishing functionality overwrites the entire branch root on every publish, which deletes custom GitHub Actions stored in .github/workflows. This prevents us from implementing automated deployment pipelines for our projects.
Impact
This is a business-critical limitation for our team. We cannot:
Automate deployments to staging/production environments
Run automated tests or quality checks on publish
Implement CI/CD pipelines that integrate with our existing infrastructure
Thanks so much for the detailed write‑up and for explaining how this affects your CI/CD setup, this is really helpful context.
I’ve passed your suggestions and questions on to the team so they can review options, and will update this thread as soon as there is any guidance or workaround that can be safely recommended.
Thanks a lot again for the detailed report and for walking through your CI/CD setup
At the moment, when WeWeb publishes to GitHub it overwrites the target folder in the branch, which means any existing .github/workflows inside that folder gets removed on each publish.
To avoid losing your workflows, the approach we recommend for now is:
Use your own repository root as the place for your code, config and GitHub Actions.
Configure WeWeb to publish its generated files into a subfolder of that repo instead of the root, for example:
One extra detail about the workflow files themselves:
Right now, the file uploader in WeWeb does not allow uploading files with a .yml extension directly.
As a workaround, you can upload your workflow as a .txt file (for example deploy-weweb.txt) in Project files, then click Set path and change its path/name to .github/workflows/deploy-weweb.yml before publishing.
After you save that path and publish, the file will appear in your repo under .github/workflows as a normal GitHub Actions workflow and GitHub will pick it up as usual.
I’m beginning to suspect that your proposed solution may have included some inaccurate information. My colleagues and I have searched through WeWeb but cannot find any way to do what you described:
In WeWeb, this means setting the publish path to something like weweb-output/ rather than the branch root.
Could you point us to where this setting is located? If it exists, this would resolve the issue completely. If not, it would mean WeWeb’s GitHub synchronization cannot be automated for deployment.
we don’t have the option to push the app to a subdirectory on GitHub
and the workaround of uploading the GitHub workflow files to the WeWeb app and pushing only the source files to GitHub doesn’t work at the moment.
We’ve added this to our backlog but the team needs a bit more time to figure out when we can add it to the roadmap proper.
In the meantime, Adrien on our team documented a workaround that should enable you to do automated deployment and leverage GitHub actions at the same time. You’ll need two repos:
Any update on this issue? Any way we could have a fix to the github workflows added to the roadmap? The github deployment is great, except that I keep getting the 502 error (which you mention is due to too many files/icons) and not being able to run github workflows/actions when its deployed (which is becoming more of a necessity).
Sorry, I know you guys are busy with the new design, but would be great if a more solid Github functionality could be included in that
It’s a bit of setup initially (I won’t lie about that ), but the documentation walks you through everything step by step. The beauty is that once it’s configured, it’s completely automated, future deploys just work without you having to think about it. No more 502 errors, and you get full access to GitHub Actions for your workflows. It’s completely customizable too, so if you need other steps in your CI, it’s easy to add them.
Hope this helps with your deployment headaches! Let me know if you have any questions about getting it set up. Any feedback is appreciated!
P.S. I know this isn’t as elegant as a built-in WeWeb solution, but it does the job just fine
After my post yesterday I looked into it again and found the after-deploy hook option. I ended up using that to trigger an n8n workflow that starts the github action.
You mentioned your script gets around the 502 errors? It appears you’re still publishing to github from weweb, how are you getting around the 502s?
Hey! My pipeline bypasses WeWeb’s built-in GitHub deployment entirely (which is where the 502s happen).
Instead, WeWeb just exports to GitHub as a source, then a Cloudflare Worker catches the webhook and triggers a GitHub Action. That Action clones the source, runs the standard build, and deploys to Cloudflare Pages. (Deployment step can be changed to any hosting type of your choosing that can handle static files.)
So the live site is built by the Action, not by WeWeb’s native deployment, that’s why the 502s don’t occur. Hope that makes sense!
If you’re interested in giving this approach a try and want some help with the setup, happy to lend a hand!
We fixed a bug related to this a while back. Can you tell me if:
you tried exporting to GitHub recently
you tried exporting on an empty GitHub repo
If yes to both, can you try adding a file manually to the GitHub repo (a README.md with lorem ipsum is fine) and then attempting the export to GitHub again?
Thanks for the reply. I cleared the github repository today and pushed a new update. The first deploy (source deploy) worked great, but when I went to do it a second time it ran into the 502 error
I went through and removed a whole icon library prior to these two tests to see if that was what was causing it (since previous discussions with support lead to too many files). That didn’t seem to do the trick.
As far as retaining the file. I also tried creating a file in the github actions directory .github/workflows/readme.md however when I did the next deploy the directory was removed.
I think we are talking about two distinct things here.
1- the 502 error
If you haven’t already can you create a bug ticket for this please, including information to help us reproduce the issue? The team will look into it.
2- working with github workflows
Indeed, when you use our WeWeb to GitHub feature, the WeWeb code will override everything in the GitHub repo. If you want to use github workflows in combination with a WeWeb app, you will need to setup a workaround with two GitHub repos. We documented the exact steps on how to do that: Repo-A/README.md at main · weweb-adriengarcia/Repo-A · GitHub