TryGhost / action-deploy-theme

:octocat: Deploy your Ghost theme with Github Actions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API Client does not support Ghost v5.54.x

abdullahsych opened this issue · comments

Github action to deploy the our theme is throwing the following error after we updated our Ghost instance:

{
  "name": "RequestNotAcceptableError",
  "context": "Provided client accept-version v5.0 is behind current Ghost version v5.54.",
  "type": "RequestNotAcceptableError",
  "details": null,
  "property": null,
  "help": "Try upgrading your Ghost API client.",
  "code": "UPDATE_CLIENT",
  "id": "3a52a090-274e-11ee-ba14-2ba7a50ffcef",
  "ghostErrorCode": null
}

I'm not able to replicate this 🤔

Are you able to share your GitHub Actions YAML file?

Here you go:

name: Deploy Theme
on:
  push:
    branches:
      - main
jobs:
  deploy:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v2
      - 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 }}

Can you try updating actions/checkout to v3?

Additionally, what's the name of the theme you're tying to upload?

Finally, do your action logs show any additional information for debugging this issue?

Updated it. It's still throwing the same error.

We have a custom theme that's been built on top of Casper. We weren't seeing this issue only until we updated our ghost instance to v5.54.

Sorry, missed your reply.

We haven't had any reports of this action failing for sites on 5.54, so I think the error is probably something else than what the message is saying.

If your theme's name is casper, can you try renaming it in package.json?

hmmm.having the same problem here. Upgraded my Ghost version and Action is throwing the following error:

{
  "name": "RequestNotAcceptableError",
  "context": "Provided client accept-version v5.0 is behind current Ghost version v5.69.",
  "type": "RequestNotAcceptableError",
  "details": null,
  "property": null,
  "help": "Try upgrading your Ghost API client.",
  "code": "UPDATE_CLIENT",
  "id": "adf62b50-71d8-11ee-8531-6f446ac31165",
  "ghostErrorCode": null
}

Just noticing the GH Action uses a significantly over version of Ghost admin-api?

"@tryghost/admin-api": "1.13.8",

vs.

    "@tryghost/admin-api": "^1.7.0",

nm. I fixed this. I was messing around with hostnames on Ghost and this impacted my ${{ secrets.GHOST_ADMIN_API_URL }} setting in Github.