How to Deploy Your Ghost Theme Using GitHub Actions
Last week I tried the Deploy Ghost Theme GitHub action. This is an excellent tool for theme deployment and a time saver. This tool helps with theme deployment. This means that instead of uploading your theme to your Ghost blog every time you make a change. You can now deploy your theme every time you push a new update to your theme repository main branch. So, the purpose of the GitHub action is to take the theme from the GitHub repo and send it to your website.
I assume you are familiar with using Git and GitHub, and your theme is already on GitHub.
➊ Create a Custom Ghost Integration
The first step is creating a new Custom Integration in Ghost Admin → Integrations.
You can give the new integration a new name—for example, Deploy Ghost Theme.
Once created the integration, two values will be available, Admin API Key, and API URL.
➋ Create GitHub Repository Secrets
On the GitHub theme repository, navigate to Settings → Secrets and variables → Actions.
Create two new secrets. The first is GHOST_ADMIN_API_KEY, containing the Admin API Key. The second is GHOST_ADMIN_API_URL, including the API URL.
➌ Add the Github Deployment Config File
Create .github/workflows/deploy-theme.yml in your local theme repository. Copy the following code into it. Once you have added this file, commit and push your changes to the remote repository.
name: Theme Deploy
on:
push:
branches:
- master
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Deploy Ghost Theme
uses: TryGhost/action-deploy-theme@v2
with:
api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}
You are now ready to test and do your first theme deployment. The workflow deploys the theme when you push a commit to its configured main branch.
On the GitHub theme repository, open the Actions tab to check the theme deployment runs.
You can click any action and see more details about it.
Looking for a professional design? Explore premium Ghost themes. Or get them all in the Aspire Themes bundle.
I hope you find this tutorial helpful.
More from the Blog
Latest Ghost Themes
Arish
For visual magazines that lead with photography, film, and selected stories.
Siwa
A personal publication that introduces the writer before inviting readers into the stories.
Hanoi
An image-led magazine for creative stories, rich navigation, and long-form reading.
Taba
A newsroom front page for coverage across topics, video, and story formats.
Marsa
A flexible publication homepage for featured stories, topics, and newsletters.
Hakone
For writers who want readers to browse complete posts on the homepage.