# GitHub Workflows Overwritten on WeWeb Publish

**URL:** <https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667>\
**Category:** Ask us anything\
**Created:** [January 19, 2026, 1:31pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667 "2026-01-19T13:31:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ginkelb](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/ginkelb/32/5579_2.png) [@ginkelb](https://community.weweb.io/u/ginkelb)\
**Post date:** [January 19, 2026, 1:31pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/1 "2026-01-19T13:31:52Z")

</div>

## Issue Summary

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
- Trigger downstream processes (notifications, cache invalidation, etc.)

Without the ability to use GitHub Actions, we’re forced into manual deployment processes that don’t scale and introduce risk of human error.

## Current Behavior

1. WeWeb publishes to GitHub
2. The entire branch root is overwritten
3. `.github/workflows` directory is deleted
4. Any custom workflows we’ve configured are lost
5. No GitHub Actions are triggered because they no longer exist

## Possible Solutions

We see a few potential approaches that could resolve this:

1. **Selective file/folder preservation** : Allow users to specify files or folders (e.g., `.github/`) that should not be overwritten during publish.
2. **Publish to a subdirectory** : Option to publish WeWeb output to a subfolder rather than the branch root, leaving the rest of the repository intact.
3. **Merge-based publishing** : Instead of overwriting, perform a merge that only updates WeWeb-managed files while preserving other files and folders.
4. **Post-publish webhook** : Trigger an external webhook after publishing completes, allowing us to run automation outside of GitHub Actions.

## Questions for the Development Team

- Is the team aware of this limitation and its impact on CI/CD workflows?
- Is there a planned solution or feature on the roadmap to address this?
- If so, what direction is the team leaning towards, and is there an estimated timeline?
- Are there any interim workarounds the team can recommend?

We’d appreciate any insight into how this might be resolved, as it’s currently blocking our ability to implement proper deployment automation.

## Related tickets

- [GitHub Push overwrites vercel.json and workflows](https://community.weweb.io/t/github-push-overwrites-vercel-json-and-workflows/19844)
- [How to build github files?](https://community.weweb.io/t/how-to-build-github-files/19939)

---

<div class="post-metadata">

**Author:** ![Agustin\_Carozo](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/agustin_carozo/32/13231_2.png) [@Agustin\_Carozo](https://community.weweb.io/u/Agustin_Carozo)\
**Post date:** [January 19, 2026, 2:17pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/2 "2026-01-19T14:17:17Z")

</div>

Hi @ginkelb

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.

---

<div class="post-metadata">

**Author:** ![Agustin\_Carozo](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/agustin_carozo/32/13231_2.png) [@Agustin\_Carozo](https://community.weweb.io/u/Agustin_Carozo)\
**Post date:** [January 22, 2026, 1:01pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/3 "2026-01-22T13:01:47Z")

</div>

Hi @ginkelb

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:

```auto
my-project/
  .github/workflows/
    deploy-weweb.yml
    other-workflows.yml
  weweb-output/
    ...WeWeb generated files...
  README.md

```

In WeWeb, this means setting the publish path to something like `weweb-output/` rather than the branch root.

 ![Screenshot 2026-01-22 at 10.00.40](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/0/011421b70a8478b636dceeee7ef6d793f31e6de5.png)

 ![Screenshot 2026-01-22 at 09.58.46](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/c2bd33d83fed46e295604ad1dc2fa6a8237ff667.png)

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.

---

<div class="post-metadata">

**Author:** ![ginkelb](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/ginkelb/32/5579_2.png) [@ginkelb](https://community.weweb.io/u/ginkelb)\
**Post date:** [January 22, 2026, 1:18pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/4 "2026-01-22T13:18:44Z")

</div>

Hi Agustin,

How do i setup WeWeb to publish in something like weweb-output/ rather then the branch root.

If this works it would be the perfect solution to this problem. 😉

---

<div class="post-metadata">

**Author:** ![ginkelb](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/ginkelb/32/5579_2.png) [@ginkelb](https://community.weweb.io/u/ginkelb)\
**Post date:** [January 29, 2026, 7:39am UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/5 "2026-01-29T07:39:09Z")

</div>

Hi Guys,  
Could you look at my question above?

---

<div class="post-metadata">

**Author:** ![ginkelb](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/ginkelb/32/5579_2.png) [@ginkelb](https://community.weweb.io/u/ginkelb)\
**Post date:** [February 5, 2026, 9:55am UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/6 "2026-02-05T09:55:16Z")

</div>

Hi Augustin,

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.

With kind regard,  
Bas

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [February 5, 2026, 12:45pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/7 "2026-02-05T12:45:49Z")

</div>

Hey @ginkelb 👋

Apologies for the late reply. I’ve been investigating this with the team and forgot to update you last week.

In theory, this should work:

- Adding the .yml workflow files to your WeWeb project
- Specifying the route (e.g. ``workflows/blabla.yml`)`
- Exporting the source code only to GitHub

See video: [https://www.tella.tv/video/push-automations-to-github-e980](https://www.tella.tv/video/push-automations-to-github-e980)

However, I tried it on my side and it doesn’t seem to be working as intended. The team needs some time to investigate further.

I’ll follow up and keep you posted here

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [February 10, 2026, 5:57pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/8 "2026-02-10T17:57:07Z")

</div>

Hi @ginkelb 👋

I can confirm:

- 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:

- One for managed files (See [Repo A example](https://github.com/weweb-adriengarcia/Repo-A))
- One for your WeWeb export (see [Repo B example](https://github.com/weweb-adriengarcia/Repo-B))

Here’s the [step by step guide](https://github.com/weweb-adriengarcia/Repo-A/blob/main/README.md).

Can you take a look and let me know if that helps?

---

<div class="post-metadata">

**Author:** ![esowers](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@esowers](https://community.weweb.io/u/esowers)\
**Post date:** [March 19, 2026, 7:09pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/10 "2026-03-19T19:09:38Z")

</div>

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 😉

---

<div class="post-metadata">

**Author:** ![Mel](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mel/32/15929_2.png) [@Mel](https://community.weweb.io/u/Mel)\
**Post date:** [March 20, 2026, 7:42am UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/11 "2026-03-20T07:42:45Z")

</div>

Hey Esowers!

I actually ran into the exact same issues and ended up building a CI template that solves this: [GitHub - Mel000000/weweb-cloudflare-ci: Automated CI/CD pipeline for deploying WeWeb projects to Cloudflare Pages with commit traceability and custom Vite overrides. · GitHub](https://github.com/Mel000000/weweb-cloudflare-ci)

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

---

<div class="post-metadata">

**Author:** ![esowers](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@esowers](https://community.weweb.io/u/esowers)\
**Post date:** [March 20, 2026, 3:03pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/12 "2026-03-20T15:03:21Z")

</div>

Ahh, thanks Mel.

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?

---

<div class="post-metadata">

**Author:** ![Mel](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mel/32/15929_2.png) [@Mel](https://community.weweb.io/u/Mel)\
**Post date:** [March 20, 2026, 4:29pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/13 "2026-03-20T16:29:39Z")

</div>

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! 🙂

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [March 23, 2026, 9:39am UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/14 "2026-03-23T09:39:07Z")

</div>

> [@esowers](#):
>
> The github deployment is great, except that I keep getting the 502 error (which you mention is due to too many files/icons)

Hey @esowers 👋

We fixed a bug related to this a while back. Can you tell me if:

1. you tried exporting to GitHub recently
2. 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?

---

<div class="post-metadata">

**Author:** ![esowers](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@esowers](https://community.weweb.io/u/esowers)\
**Post date:** [March 24, 2026, 5:59pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/15 "2026-03-24T17:59:12Z")

</div>

@Joyce

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

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/3X/b/b/bb552ce345f34069a46029baba5add99438c8318.png)

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.

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [March 24, 2026, 6:08pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/16 "2026-03-24T18:08:48Z")

</div>

Hey @esowers 👋

I think we are talking about two distinct things here.

## 1- the 502 error

> [@esowers](#):
>
> 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
> 
> ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/3X/b/b/bb552ce345f34069a46029baba5add99438c8318.png)

If you haven’t already can you [create a bug ticket](https://support.weweb.io/?category=bug) for this please, including information to help us reproduce the issue? The team will look into it.

## 2- working with github workflows

> [@esowers](#):
>
> 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.

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](https://github.com/weweb-adriengarcia/Repo-A/blob/main/README.md)

---

<div class="post-metadata">

**Author:** ![ginkelb](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/ginkelb/32/5579_2.png) [@ginkelb](https://community.weweb.io/u/ginkelb)\
**Post date:** [May 4, 2026, 11:25am UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/17 "2026-05-04T11:25:51Z")

</div>

Hi Joyce,  
did the team come up with a solution? Would love to simplify our deployment strategy since is quite combersome and error prone right now.

With kind regard,  
Bas

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [May 4, 2026, 2:53pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/18 "2026-05-04T14:53:07Z")

</div>

Hey @ginkelb 👋

The solution with the two repos proposed by Adrien isn’t working well for you?

---

<div class="post-metadata">

**Author:** ![ginkelb](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/ginkelb/32/5579_2.png) [@ginkelb](https://community.weweb.io/u/ginkelb)\
**Post date:** [May 7, 2026, 1:09pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/19 "2026-05-07T13:09:16Z")

</div>

Hi @Joyce,

hopefully we can agree that Adrien’s solution is elegant but also technically complexer than should be required. It’s also not quite clear how a commit from WeWeb to the repo would trigger an automated process to be triggered that starts the deployment process.

Our current setup is to have WeWeb push to the development branch of the repo and then do a manual pull-request to our acceptance branch where the workflow file already exists. That commit to the acceptance branch triggers the workflows that build, check and deploy.

Our worklife is already complex enough that I don’t want to have two repositories for every weweb project that we’ll be running.

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [May 7, 2026, 1:49pm UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/20 "2026-05-07T13:49:38Z")

</div>

Hey Bas 👋

> [@ginkelb](#):
>
> hopefully we can agree that Adrien’s solution is elegant but also technically complexer than should be required.

Yes, of course. The product ticket is open but I’m not sure when we’ll be able to prioritize it.

---

<div class="post-metadata">

**Author:** ![ginkelb](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/ginkelb/32/5579_2.png) [@ginkelb](https://community.weweb.io/u/ginkelb)\
**Post date:** [September 15, 2026, 8:47am UTC](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667/21 "2026-09-15T08:47:43Z")

</div>

Hi Joyce,

a few months down the line? Any updates on this?

[Next page](https://community.weweb.io/t/github-workflows-overwritten-on-weweb-publish/20667.md?page=2)
