Secondary theme directory created when new code pushed to GitHub

I’m very new to using Ghost and I’m testing out updating my theme using Github. I’ve uploaded my custom theme files to a repository, and I can successfully update the theme when changes are made.

However, whenever a deploy theme run is made after a code change, I end up with a secondary theme directory named as follows:

themename_645a0c7ecd8ad701c06b7d03

Whereas, my original theme was just in a directory called “themename”.

Is there a way to avoid the duplication of directories? I don’t understand why the code push isn’t just updating the existing theme directory.

That’s not how the GitHub Action should work. If your repo is public, can you share it? Otherwise, can you share your GitHub Action YAML file and package.json file?

Thanks.

Thanks for the quick reply Ryan. I’ve just switched to another purchased theme, so no longer need to fix this - but in case it’s helpful, I used an exact copy of the Casper package.json (with a name change and author modifications) and then used this for the YAML:

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

Thanks. What was your theme name?