# Not referencing an action that does force push in the docs maybe?

**URL:** <https://zola.discourse.group/t/not-referencing-an-action-that-does-force-push-in-the-docs-maybe/2196>\
**Category:** Uncategorized\
**Created:** [July 6, 2024, 8:40pm UTC](https://zola.discourse.group/t/not-referencing-an-action-that-does-force-push-in-the-docs-maybe/2196 "2024-07-06T20:40:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![knzai](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/knzai/32/1262_2.png) [@knzai](https://zola.discourse.group/u/knzai)\
**Post date:** [July 6, 2024, 8:40pm UTC](https://zola.discourse.group/t/not-referencing-an-action-that-does-force-push-in-the-docs-maybe/2196/1 "2024-07-06T20:40:02Z")

</div>

Absolutely no disrespect, I started with just doing a refactor of his repo to get rid of the force push/history erasure. But it seems like Shaleen Jain’s action sometimes bites people and wipes their repos (if they misunderstand which branch is the target and which the source). I was mostly just annoyed by losing history in GH-Pages and started a refactor based on that. If he ends up accepting that approach this topic becomes moot, but not sure he will based on shooting it down the concern 2021 in an issue.

I came up with some other actions without the force push. Feel free to use and give me feedback/bugs/etc (I’m using it on my own blog).

If anyone at Zola likes I’ll happily push either or both of them to the org repo with any requested changes (installing specific zola versions for instance) so there’s an official actions/zola that does a safe deploy. Obviously doing this maybe after more testing, as I just made these in the last day or two.

I ended up making an action that replicates the CLI using @ref sub actions modeled after taiki-e/install-action@zola.

> **[GitHub - knzai/zola-build: Build (and/or deploy) a getzola/zola site](https://github.com/knzai/zola-build)**
>
> Build (and/or deploy) a getzola/zola site. Contribute to knzai/zola-build development by creating an account on GitHub.

eg:

```yml
    - uses: knzai/zola-cli@build 
      with:
        drafts: true
        root: docs
        output-dir: not-public

```

and one that wraps that and uses JamesIves/github-pages-deploy-action for the actual deploy

> **[GitHub - knzai/zola-build: Build (and/or deploy) a getzola/zola site](https://github.com/knzai/zola-build)**
>
> Build (and/or deploy) a getzola/zola site. Contribute to knzai/zola-build development by creating an account on GitHub.

```yml
    - uses: knzai/zola-build@v2 
      with:
        check: false
        deploy: false
        drafts: true

```

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/system/32/2_2.png) [@system](https://zola.discourse.group/u/system)\
**Post date:** [July 11, 2024, 4:49am UTC](https://zola.discourse.group/t/not-referencing-an-action-that-does-force-push-in-the-docs-maybe/2196/2 "2024-07-11T04:49:13Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/system/32/2_2.png) [@system](https://zola.discourse.group/u/system)\
**Post date:** [July 11, 2024, 11:41am UTC](https://zola.discourse.group/t/not-referencing-an-action-that-does-force-push-in-the-docs-maybe/2196/3 "2024-07-11T11:41:53Z")

</div>


