# GitHub Theme publish error

**URL:** <https://forum.ghost.org/t/github-theme-publish-error/49086>\
**Category:** Themes\
**Created:** [July 26, 2024, 5:23pm UTC](https://forum.ghost.org/t/github-theme-publish-error/49086 "2024-07-26T17:23:17Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmf](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@gmf](https://forum.ghost.org/u/gmf)\
**Post date:** [July 26, 2024, 5:23pm UTC](https://forum.ghost.org/t/github-theme-publish-error/49086/1 "2024-07-26T17:23:17Z")

</div>

I have been using the GitHub publish action over the last several years successfully with a custom theme. I have not run the publish action in the past several months but when I tried to today I received an error about the node version being out of date. I corrected this but using the latest version of the publish action [found here](https://github.com/marketplace/actions/deploy-ghost-theme).

Even still I’m receiving an error when I publish which is different that the one mentioned above about the node version. Looking at the log, I see the following error.

```auto
 adding: home.hbs (deflated 71%)
AxiosError: Request failed with status code 403
    at settle (/home/runner/work/_actions/TryGhost/action-deploy-theme/v1/dist/index.js:40657:12)
    at BrotliDecompress.handleStreamEnd (/home/runner/work/_actions/TryGhost/action-deploy-theme/v1/dist/index.js:41756:11)
    at BrotliDecompress.emit (node:events:531:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
    at Axios.request (/home/runner/work/_actions/TryGhost/action-deploy-theme/v1/dist/index.js:42567:41)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async main (/home/runner/work/_actions/TryGhost/action-deploy-theme/v1/dist/index.js:43140:9) {
  code: 'ERR_BAD_REQUEST'

```

Does anyone know what could be wrong and how to fix this? Thank you.

---

<div class="post-metadata">

**Author:** ![gmf](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@gmf](https://forum.ghost.org/u/gmf)\
**Post date:** [August 4, 2024, 1:14am UTC](https://forum.ghost.org/t/github-theme-publish-error/49086/2 "2024-08-04T01:14:02Z")

</div>

The issue was that “Bot Fight Mode” was turned on behind my Cloudflare proxied ghost install. When I disabled this setting my theme publishing began working again. Enabling the new [Block AI Scrapers and Crawlers](https://blog.cloudflare.com/declaring-your-aindependence-block-ai-bots-scrapers-and-crawlers-with-a-single-click) feature does not cause any issues with the GitHub theme publishing.

---

<div class="post-metadata">

**Author:** ![martinverbic](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/martinverbic/32/24543_2.png) [@martinverbic](https://forum.ghost.org/u/martinverbic)\
**Post date:** [October 5, 2024, 11:54am UTC](https://forum.ghost.org/t/github-theme-publish-error/49086/3 "2024-10-05T11:54:03Z")

</div>

Does anyone know the solution to this? I have the exact same situation with the exact same error, after using GitHub actions with Ghost for years. I turned off the “Bot Fight Mode”, but nothing changes. Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [October 5, 2024, 12:00pm UTC](https://forum.ghost.org/t/github-theme-publish-error/49086/4 "2024-10-05T12:00:11Z")

</div>

It might be helpful to turn the Cloudflare proxying off entirely off to see if the behavior changes. (Not just bot fight mode, but all of it.)

If your deploy works, then you’ll know it’s something in your proxy setup. If it’s still broken, then you can exonerate Cloudflare and move on to investigating other options.

---

<div class="post-metadata">

**Author:** ![martinverbic](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/martinverbic/32/24543_2.png) [@martinverbic](https://forum.ghost.org/u/martinverbic)\
**Post date:** [October 5, 2024, 1:13pm UTC](https://forum.ghost.org/t/github-theme-publish-error/49086/5 "2024-10-05T13:13:03Z")

</div>

Thanks for responding. I tried all of this, but no luck. I always get the same error.

Cloudflare is also not something new. I’ve been using it for a long time and everything worked until a few days ago, and it’s the same across all of my Ghost websites.

---

<div class="post-metadata">

**Author:** ![martinverbic](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/martinverbic/32/24543_2.png) [@martinverbic](https://forum.ghost.org/u/martinverbic)\
**Post date:** [October 6, 2024, 2:02pm UTC](https://forum.ghost.org/t/github-theme-publish-error/49086/6 "2024-10-06T14:02:31Z")

</div>

I don’t know what the exact solution was, but I used this .yml file and once again regenerated the credentials (after previously doing the same about 3 times). And it somehow started working.

```auto
name: Deploy Theme
on:
  push:
    branches:
      - master
      - main
jobs:
  deploy:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
      - name: Deploy Ghost Theme
        uses: TryGhost/action-deploy-theme@v1.6.6
        with:
          api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
          api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}
      

```

---

<div class="post-metadata">

**Author:** ![cuongtran](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cuongtran/32/25111_2.png) [@cuongtran](https://forum.ghost.org/u/cuongtran)\
**Post date:** [October 6, 2024, 11:44pm UTC](https://forum.ghost.org/t/github-theme-publish-error/49086/7 "2024-10-06T23:44:51Z")

</div>

Go AWF \> Tool

Add `AS8075` and `allow`

 ![image](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/3X/b/6/b67037c35991a66faf40f7ca1299fa6faf5c812b.png)

Cloudflare will allow Github bypass their firewall.

However, ghost explorer will still block your site if fight bot turn on.

---

<div class="post-metadata">

**Author:** ![gmf](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@gmf](https://forum.ghost.org/u/gmf)\
**Post date:** [October 7, 2024, 12:09am UTC](https://forum.ghost.org/t/github-theme-publish-error/49086/8 "2024-10-07T00:09:13Z")

</div>

The most [updated action code](https://github.com/marketplace/actions/deploy-ghost-theme) is slighly different from the one you posted. Have you tried this version?

---

<div class="post-metadata">

**Author:** ![martinverbic](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/martinverbic/32/24543_2.png) [@martinverbic](https://forum.ghost.org/u/martinverbic)\
**Post date:** [October 7, 2024, 5:01am UTC](https://forum.ghost.org/t/github-theme-publish-error/49086/9 "2024-10-07T05:01:29Z")

</div>

Thanks for answering

---

<div class="post-metadata">

**Author:** ![martinverbic](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/martinverbic/32/24543_2.png) [@martinverbic](https://forum.ghost.org/u/martinverbic)\
**Post date:** [October 7, 2024, 5:02am UTC](https://forum.ghost.org/t/github-theme-publish-error/49086/10 "2024-10-07T05:02:03Z")

</div>

Thanks. I know and tried. But it works now with the code I posted.

---

<div class="post-metadata">

**Author:** ![gmf](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@gmf](https://forum.ghost.org/u/gmf)\
**Post date:** [October 7, 2024, 9:48pm UTC](https://forum.ghost.org/t/github-theme-publish-error/49086/11 "2024-10-07T21:48:45Z")

</div>

That’s a great tip. Is there a similar filter for ghost explore to work?
