Deploy Ghost Theme failing without details

Both my developer and myself have tried to get the theme deploy working from GitHub, and it’s failing without details of why (that I can see at least). I reviewed the issues log for the action on TryGhost on GitHub for others with similar issues but wasn’t sure where to go from here. I’m referencing the latest version I believe but it still fails.

The deploy-theme.yml is:

At first I thought it was spaces in the folder name so I renamed it too. I’ve tried the working-directory with and without the ./ as well as with and without quotes.

1 Like

Can you share a link to the logs if they’re public?

Hi,

The repo is not public but I have pasted the contents here, snipping some parts to make the character count fit. Does that help?

Jen

2024-01-08T21:40:57.9848689Z Requested labels: ubuntu-22.04
2024-01-08T21:40:57.9849144Z Job defined at: jenkuntz/Website-jenkuntz-Ghost/.github/workflows/deploy-theme.yml@refs/heads/main
2024-01-08T21:40:57.9849336Z Waiting for a runner to pick up this job…
2024-01-08T21:40:58.5976945Z Job is waiting for a hosted runner to come online.
2024-01-08T21:41:02.3910546Z Job is about to start running on the hosted runner: GitHub Actions 34 (hosted)
2024-01-08T21:41:05.5672163Z Current runner version: ‘2.311.0’
2024-01-08T21:41:05.5705654Z ##[group]Operating System
2024-01-08T21:41:05.5706595Z Ubuntu
2024-01-08T21:41:05.5707354Z 22.04.3
2024-01-08T21:41:05.5707834Z LTS
2024-01-08T21:41:05.5708370Z ##[endgroup]
2024-01-08T21:41:05.5709058Z ##[group]Runner Image
2024-01-08T21:41:05.5709740Z Image: ubuntu-22.04
2024-01-08T21:41:05.5710374Z Version: 20240107.1.0
2024-01-08T21:41:05.5712301Z Included Software: runner-images/images/ubuntu/Ubuntu2204-Readme.md at ubuntu22/20240107.1 · actions/runner-images · GitHub
2024-01-08T21:41:05.5714499Z Image Release: Release Ubuntu 22.04 (20240107) Image Update · actions/runner-images · GitHub
2024-01-08T21:41:05.5715865Z ##[endgroup]
2024-01-08T21:41:05.5716568Z ##[group]Runner Image Provisioner
2024-01-08T21:41:05.5717324Z 2.0.324.1
2024-01-08T21:41:05.5717877Z ##[endgroup]
2024-01-08T21:41:05.5719469Z ##[group]GITHUB_TOKEN Permissions
2024-01-08T21:41:05.5721865Z Contents: read
2024-01-08T21:41:05.5722652Z Metadata: read
2024-01-08T21:41:05.5723476Z Packages: read
2024-01-08T21:41:05.5724301Z ##[endgroup]
2024-01-08T21:41:05.5728733Z Secret source: Actions
2024-01-08T21:41:05.5729782Z Prepare workflow directory
2024-01-08T21:41:05.6643505Z Prepare all required actions
2024-01-08T21:41:05.6874681Z Getting action download info
2024-01-08T21:41:05.9931707Z Download action repository ‘actions/checkout@v3’ (SHA:f43a0e5ff2bd294095638e18286ca9a3d1956744)
2024-01-08T21:41:06.1781282Z Download action repository ‘TryGhost/action-deploy-theme@v1.6.4’ (SHA:ba1de75b3eef27fee07a4cab741d27d179c198d8)
2024-01-08T21:41:06.9336573Z Complete job name: deploy
2024-01-08T21:41:07.0721151Z ##[group]Run actions/checkout@v3
2024-01-08T21:41:07.0722093Z with:
2024-01-08T21:41:07.0722826Z repository: jenkuntz/Website-jenkuntz-Ghost
2024-01-08T21:41:07.0724341Z token: ***
2024-01-08T21:41:07.0724969Z ssh-strict: true
2024-01-08T21:41:07.0725653Z persist-credentials: true
2024-01-08T21:41:07.0726409Z clean: true
2024-01-08T21:41:07.0727067Z sparse-checkout-cone-mode: true
2024-01-08T21:41:07.0727921Z fetch-depth: 1
2024-01-08T21:41:07.0728563Z fetch-tags: false
2024-01-08T21:41:07.0729192Z lfs: false
2024-01-08T21:41:07.0729793Z submodules: false
2024-01-08T21:41:07.0730466Z set-safe-directory: true
2024-01-08T21:41:07.0731179Z ##[endgroup]
2024-01-08T21:41:07.4538329Z Syncing repository: jenkuntz/Website-jenkuntz-Ghost
2024-01-08T21:41:07.4541298Z ##[group]Getting Git version info
2024-01-08T21:41:07.4542544Z Working directory is ‘/home/runner/work/Website-jenkuntz-Ghost/Website-jenkuntz-Ghost’
2024-01-08T21:41:07.4545313Z [command]/usr/bin/git version
2024-01-08T21:41:07.4620669Z git version 2.43.0
2024-01-08T21:41:07.4654172Z ##[endgroup]
2024-01-08T21:41:07.4674497Z Temporarily overriding HOME=‘/home/runner/work/_temp/b84374f5-d290-475d-8394-940b39f0d4e1’ before making global git config changes
2024-01-08T21:41:07.4676249Z Adding repository directory to the temporary git global config as a safe directory
2024-01-08T21:41:07.4680077Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/Website-jenkuntz-Ghost/Website-jenkuntz-Ghost
2024-01-08T21:41:07.4734599Z Deleting the contents of ‘/home/runner/work/Website-jenkuntz-Ghost/Website-jenkuntz-Ghost’
2024-01-08T21:41:07.4739800Z ##[group]Initializing the repository
2024-01-08T21:41:07.4744736Z [command]/usr/bin/git init /home/runner/work/Website-jenkuntz-Ghost/Website-jenkuntz-Ghost
2024-01-08T21:41:07.4908231Z hint: Using ‘master’ as the name for the initial branch. This default branch name
2024-01-08T21:41:07.4909519Z hint: is subject to change. To configure the initial branch name to use in all
2024-01-08T21:41:07.4910612Z hint: of your new repositories, which will suppress this warning, call:
2024-01-08T21:41:07.4911631Z hint:
2024-01-08T21:41:07.4912204Z hint: git config --global init.defaultBranch
2024-01-08T21:41:07.4912824Z hint:
2024-01-08T21:41:07.4913508Z hint: Names commonly chosen instead of ‘master’ are ‘main’, ‘trunk’ and
2024-01-08T21:41:07.4915794Z hint: ‘development’. The just-created branch can be renamed via this command:
2024-01-08T21:41:07.4917065Z hint:
2024-01-08T21:41:07.4917532Z hint: git branch -m
2024-01-08T21:41:07.4918762Z Initialized empty Git repository in /home/runner/work/Website-jenkuntz-Ghost/Website-jenkuntz-Ghost/.git/
2024-01-08T21:41:07.4921345Z [command]/usr/bin/git remote add origin https://github.com/jenkuntz/Website-jenkuntz-Ghost
2024-01-08T21:41:07.4936124Z ##[endgroup]
2024-01-08T21:41:07.4936924Z ##[group]Disabling automatic garbage collection
2024-01-08T21:41:07.5106806Z [command]/usr/bin/git config --local gc.auto 0
2024-01-08T21:41:07.5108530Z ##[endgroup]
2024-01-08T21:41:07.5109271Z ##[group]Setting up auth
2024-01-08T21:41:07.5110198Z [command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
2024-01-08T21:41:07.5113595Z [command]/usr/bin/git submodule foreach --recursive sh -c “git config --local --name-only --get-regexp ‘core.sshCommand’ && git config --local --unset-all ‘core.sshCommand’ || :”
2024-01-08T21:41:07.5767669Z [command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
2024-01-08T21:41:07.6052033Z [command]/usr/bin/git submodule foreach --recursive sh -c “git config --local --name-only --get-regexp ‘http.https://github.com/.extraheader’ && git config --local --unset-all ‘http.https://github.com/.extraheader’ || :”
2024-01-08T21:41:07.6189357Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
2024-01-08T21:41:07.6241890Z ##[endgroup]
2024-01-08T21:41:07.6243396Z ##[group]Fetching the repository
2024-01-08T21:41:07.6254008Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +aebe3c545158625c2dcc207f2f1f2b06246154bf:refs/remotes/origin/main
2024-01-08T21:41:08.0819370Z remote: Enumerating objects: 125, done.
2024-01-08T21:41:08.0869228Z remote: Counting objects: 0% (1/125)
2024-01-08T21:41:08.0870278Z remote: Counting objects: 1% (2/125)

2024-01-08T21:41:08.0944225Z remote: Counting objects: 99% (124/125)
2024-01-08T21:41:08.0944906Z remote: Counting objects: 100% (125/125)
2024-01-08T21:41:08.0945658Z remote: Counting objects: 100% (125/125), done.
2024-01-08T21:41:08.0946608Z remote: Compressing objects: 0% (1/117)
2024-01-08T21:41:08.0947362Z remote: Compressing objects: 1% (2/117)

2024-01-08T21:41:08.1039976Z remote: Compressing objects: 99% (116/117)
2024-01-08T21:41:08.1040854Z remote: Compressing objects: 100% (117/117)
2024-01-08T21:41:08.1041912Z remote: Compressing objects: 100% (117/117), done.
2024-01-08T21:41:08.1042930Z Receiving objects: 0% (1/125)
2024-01-08T21:41:08.1043613Z Receiving objects: 1% (2/125)

2024-01-08T21:41:08.1599937Z Receiving objects: 99% (124/125)
2024-01-08T21:41:08.1600607Z Receiving objects: 100% (125/125)
2024-01-08T21:41:08.1601544Z Receiving objects: 100% (125/125), 238.63 KiB | 3.79 MiB/s, done.
2024-01-08T21:41:08.1613592Z Resolving deltas: 0% (0/10)
2024-01-08T21:41:08.1614270Z Resolving deltas: 10% (1/10)
2024-01-08T21:41:08.1615258Z Resolving deltas: 20% (2/10)
2024-01-08T21:41:08.1619343Z Resolving deltas: 30% (3/10)
2024-01-08T21:41:08.1620029Z Resolving deltas: 40% (4/10)
2024-01-08T21:41:08.1620758Z Resolving deltas: 50% (5/10)
2024-01-08T21:41:08.1621402Z Resolving deltas: 60% (6/10)
2024-01-08T21:41:08.1622122Z Resolving deltas: 70% (7/10)
2024-01-08T21:41:08.1622705Z Resolving deltas: 80% (8/10)
2024-01-08T21:41:08.1623350Z Resolving deltas: 90% (9/10)
2024-01-08T21:41:08.1624066Z Resolving deltas: 100% (10/10)
2024-01-08T21:41:08.1624731Z Resolving deltas: 100% (10/10), done.
2024-01-08T21:41:08.1751639Z From https://github.com/jenkuntz/Website-jenkuntz-Ghost
2024-01-08T21:41:08.1753148Z * [new ref] aebe3c545158625c2dcc207f2f1f2b06246154bf → origin/main
2024-01-08T21:41:08.1809328Z ##[endgroup]
2024-01-08T21:41:08.1810658Z ##[group]Determining the checkout info
2024-01-08T21:41:08.1815604Z ##[endgroup]
2024-01-08T21:41:08.1816949Z ##[group]Checking out the ref
2024-01-08T21:41:08.1819108Z [command]/usr/bin/git checkout --progress --force -B main refs/remotes/origin/main
2024-01-08T21:41:08.1991292Z Switched to a new branch ‘main’
2024-01-08T21:41:08.1996413Z branch ‘main’ set up to track ‘origin/main’.
2024-01-08T21:41:08.2007113Z ##[endgroup]
2024-01-08T21:41:08.2065559Z [command]/usr/bin/git log -1 --format=‘%H’
2024-01-08T21:41:08.2266415Z ‘aebe3c545158625c2dcc207f2f1f2b06246154bf’
2024-01-08T21:41:08.2608338Z ##[group]Run TryGhost/action-deploy-theme@v1.6.4
2024-01-08T21:41:08.2609011Z with:
2024-01-08T21:41:08.2609619Z api-url: ***
2024-01-08T21:41:08.2610555Z api-key: ***
2024-01-08T21:41:08.2611015Z working-directory: ./SaimaThemeFiles
2024-01-08T21:41:08.2612311Z ##[endgroup]
2024-01-08T21:41:08.3608075Z {}
2024-01-08T21:41:08.3759541Z Post job cleanup.
2024-01-08T21:41:08.5015138Z [command]/usr/bin/git version
2024-01-08T21:41:08.5073869Z git version 2.43.0
2024-01-08T21:41:08.5128273Z Temporarily overriding HOME=‘/home/runner/work/_temp/fd82441b-4c6f-464f-8f1c-a9369a9101ad’ before making global git config changes
2024-01-08T21:41:08.5130237Z Adding repository directory to the temporary git global config as a safe directory
2024-01-08T21:41:08.5137674Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/Website-jenkuntz-Ghost/Website-jenkuntz-Ghost
2024-01-08T21:41:08.5189878Z [command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
2024-01-08T21:41:08.5236709Z [command]/usr/bin/git submodule foreach --recursive sh -c “git config --local --name-only --get-regexp ‘core.sshCommand’ && git config --local --unset-all ‘core.sshCommand’ || :”
2024-01-08T21:41:08.5558232Z [command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
2024-01-08T21:41:08.5592622Z http.https://github.com/.extraheader
2024-01-08T21:41:08.5609640Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2024-01-08T21:41:08.5660641Z [command]/usr/bin/git submodule foreach --recursive sh -c “git config --local --name-only --get-regexp ‘http.https://github.com/.extraheader’ && git config --local --unset-all ‘http.https://github.com/.extraheader’ || :”
2024-01-08T21:41:08.6252611Z Cleaning up orphan processes

It does help to confirm that the GitHub UI isn’t being weird :smiley: Sometimes it won’t show the logs for a step, even if the step had logs.

Can you confirm that SaimaThemeFiles exists in the associated commit (e.g. https://github.com/jenkuntz/Website-jenkuntz-Ghost/tree/aebe3c545158625c2dcc207f2f1f2b06246154bf/SaimaThemeFiles)? And if so, what files exist there?

OK I found the path https://github.com/jenkuntz/Website-jenkuntz-Ghost/tree/aebe3c545158625c2dcc207f2f1f2b06246154bf/SaimaThemeFiles and this is what’s in it, all theme files that I would otherwise zip up and upload manually.

Okay, that’s good to see. Another thing to check - have you tried re-running the job (or against multiple commits)? Hopefully it’s a glitch before we start looking into the Action’s behavior :sweat_smile:

Still failed.

Thanks for trying, that exit code 1 from the debug log was helpful. It looks like any errors that come from the action are getting masked right now (cc @RyanF)

In the meantime, I’ve created a hacked version of the action to properly log the error - here is the diff for reference: Comparing TryGhost:main...vikaspotluri123:tmp-hack-error · TryGhost/action-deploy-theme · GitHub

Can you try with this version to get the actual error? Replace TryGhost/action-deploy-theme* with vikaspotluri123/action-deploy-theme@tmp-hack-error in your action.

Thank you, sorry for the delayed response. SUCCESS!

It says invalid URL, shouldn’t have a trailing slash. After removing the trailing slash from the URL in secrets the deploy succeeded. Thank you very much. Is whatever you modified to show the error something you’re going to update about the actual deploy action?

Interestingly enough, copying the value from Ghost Admin’s Integrations section visually has no trailing slash but pasting it contains a slash. My humble guess is users would never know to remove that.

I reset the deploy back to TryGhost/… and it continues to deploy successfully now.

Thank you so much! I appreciate all of your responses to help me with this.

2 Likes

I hacked the output to ungate you, but I’m going to defer to the primary maintainers of the action to determine the proper solution - the error was masked because the code was trying to print it in a standard format.

What version of Ghost are you using? I tried locally and I got the URL without a trailing slash, even if I configured my URL with a trailing slash.

1 Like

@vikaspotluri123 Thanks for figuring this out! Do you know what part of the console statement causes the masking?

I think the error needs to be stringified (e.g. using util.inspect) prior to being passed to JSON.serialize

I’m using Ghost Pro not self hosted Ghost, so whatever version that is…

I was using my iPad so will try on my laptop this afternoon to see if I can reproduce it there, it was odd for sure.

1 Like

You can get your Ghost version by heading to Settings → scroll all the way down in the left sidebar and click the Ghost logo (or /ghost/#/settings/about)

Thanks. 5.75.1+moya is what it says.

Regarding the copy/paste thing, I cannot reproduce it from the laptop, so copying on mobile might somehow add the trailing slash. Anyway, if it was a weird scenario that only I happened to run into, others may not!

Thanks again for all your help.

2 Likes