Giter Site home page Giter Site logo

action-deploy-theme's Introduction

Ghost

Deploy your Ghost Theme from GitHub

View Action Contributors Issues OpenCollective

This GitHub action allows you to automatically build and deploy your Ghost Theme
from GitHub to any Ghost install, via the Ghost Admin API!


 

Getting Started

💡This action expects that you already have a working Ghost install running at least v2.25.5.

  1. Generate a set of Ghost Admin API credentials, by configuring a new Custom Integration in Ghost Admin»Integrations.

  2. On GitHub, navigate to your theme repository»Settings»Secrets. Create a secret called GHOST_ADMIN_API_URL containing the API URL and another called GHOST_ADMIN_API_KEY containing the Admin API Key. Both must be copied exactly from Ghost Admin»Integrations.

  3. Once your secrets are in place, copy this example config into .github/workflows/deploy-theme.yml. Then commit and push your changes:

name: Deploy Theme
on:
  push:
    branches:
      - master
      - main
jobs:
  deploy:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v2
      - name: Deploy Ghost Theme
        uses: TryGhost/[email protected]
        with:
          api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
          api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}

This will trigger a deployment for every commit to master. If you'd like to change the "on" event, see the GitHub action documentation, which shows how to build on Pull Requests, Releases, Tags and more.

Configuration

The with portion of the workflow must be configured before the action will work. Any secrets must be referenced using the bracket syntax and stored in the GitHub repositories Settings/Secrets menu. You can learn more about setting environment variables with GitHub actions here.

Key Value Information Type Required
api-url The base URL of your Ghost Admin API, found by configuring a new Custom Integration in Ghost Admin»Integrations secrets Yes
api-key The authentication key for your Ghost Admin API, found by configuring a new Custom Integration in Ghost Admin»Integrations secrets Yes
exclude A list of files & folders to exclude from the generated zip file in addition to the defaults, e.g. "gulpfile.js *dist/*" string No
theme-name A custom theme name that overrides the default name in package.json. Useful if you use a fork of Casper, e.g. "my-theme" string No
file Path to a built zip file. If this is included, the exclude and theme-name options are ignored string No

 

💡 Use exclude to reduce the size of the zip file & keep deployment times minimal.

 


Don't forget to 🌟 Star 🌟 the repo if you like this GitHub Action !

Copyright & License

Copyright (c) 2013-2021 Ghost Foundation - Released under the MIT license.

action-deploy-theme's People

Contributors

daniellockyer avatar erisds avatar gep13 avatar johnonolan avatar kevinansfield avatar mrkwse avatar renovate-bot avatar vikaspotluri123 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.