# Concern about repo safety with github actions deploy

**URL:** <https://zola.discourse.group/t/concern-about-repo-safety-with-github-actions-deploy/1100>\
**Category:** Support\
**Created:** [December 7, 2021, 6:38am UTC](https://zola.discourse.group/t/concern-about-repo-safety-with-github-actions-deploy/1100 "2021-12-07T06:38:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pauleaster](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/pauleaster/32/621_2.png) [@pauleaster](https://zola.discourse.group/u/pauleaster)\
**Post date:** [December 7, 2021, 6:38am UTC](https://zola.discourse.group/t/concern-about-repo-safety-with-github-actions-deploy/1100/1 "2021-12-07T06:38:00Z")

</div>

Hi all,

Just a preface to emphasise that this is not a whinge 🙂 that I think Zola is fantastic and great work!!!

I am not sure what I have done wrong, but I successfully ran the GitHub actions and it not only overwrote my repo but it also deleted the repo history. Fortunately, I still have a local commit for the repo. But this is concerning. This workflow needs to be explained better to prevent noobs (like me!) from losing their websites.

Steps to replicate:

1. Have a GitHub repo [myname.github.io](http://myname.github.io) for your Zola project.
2. Run the GitHub action to deploy Zola in /docs
3. Website didn’t work
4. Try again point to the root of the repo
5. Repo is completely replaced by the build files and no git history remains.

So I have one question and one suggestion.  
The question is:  
Should I be using a different repo than `myname/myname.github.io`? Say `myname/mywebsite` and build this so that it ends up in `myname/myname.github.io`?  
PS: I have a custom domain name, `myname.dev` associated with `myname/myname.github.io`

My suggestion is that there needs to be a warning here in the instructions to steer users away from this problem.

I think that my problem was that I thought that gh-pages branch should be replaced by my source branch. Because I used my source branch, then my source was overwritten.

---

<div class="post-metadata">

**Author:** ![pauleaster](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/pauleaster/32/621_2.png) [@pauleaster](https://zola.discourse.group/u/pauleaster)\
**Post date:** [December 7, 2021, 6:44am UTC](https://zola.discourse.group/t/concern-about-repo-safety-with-github-actions-deploy/1100/2 "2021-12-07T06:44:42Z")

</div>

Phew, disaster averted with `git push --mirror git@github.com:myname/website.git`

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [December 7, 2021, 10:31am UTC](https://zola.discourse.group/t/concern-about-repo-safety-with-github-actions-deploy/1100/3 "2021-12-07T10:31:19Z")

</div>

I don’t maintain the GH action so it would be better to open an issue on their repo. Maybe it’s missing some documentation/explanations?

---

<div class="post-metadata">

**Author:** ![pauleaster](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/pauleaster/32/621_2.png) [@pauleaster](https://zola.discourse.group/u/pauleaster)\
**Post date:** [December 8, 2021, 1:22am UTC](https://zola.discourse.group/t/concern-about-repo-safety-with-github-actions-deploy/1100/4 "2021-12-08T01:22:17Z")

</div>

> I don’t maintain the GH action so it would be better to open an issue on their repo. Maybe it’s missing some documentation/explanations?

Done.  
This is related to [zola-deploy-action/issues/26/keep commit history in gh-pages branch](https://github.com/shalzz/zola-deploy-action/issues/26). If this issue was fixed then there would be no problem. And even if someone accidentally overwrote their source then they could just revert.
