Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for the deploy Github Action #123

Merged
merged 3 commits into from
Jan 11, 2020
Merged

Support for the deploy Github Action #123

merged 3 commits into from
Jan 11, 2020

Conversation

d3473r
Copy link
Contributor

@d3473r d3473r commented Jan 9, 2020

With this PR you only need to add a Readme or Wiki Entry which could look like this:

  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. Create a file .github/workflows/deploy-theme.yml with the contents:
name: Deploy Theme
on: [push]

jobs:
  deploy:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@master
      - uses: actions/setup-node@v1
        with:
          node-version: '10.x'
      - run: npm install
        working-directory: ./src
      - name: Build and deploy the theme
        working-directory: ./src
        run: npm run deploy
        env:
          GHOST_ADMIN_API_URL: ${{ secrets.GHOST_ADMIN_API_URL }}
          GHOST_ADMIN_API_KEY: ${{ secrets.GHOST_ADMIN_API_KEY }}

Manual deployment is also possible.

  1. Copy .env.example to .env
  2. Enter your GHOST_ADMIN_API_URL and GHOST_ADMIN_API_KEY in the .env file (Not in the .env.example file!!! Because this file is tracked with git and your secrets would be uploaded to your git repo)
  3. Run npm run deploy in the src directory
    Now the theme gets build and deployed to your ghost instance.

@d3473r d3473r mentioned this pull request Jan 9, 2020
src/package.json Outdated Show resolved Hide resolved
src/package.json Outdated Show resolved Hide resolved
@eddiesigner
Copy link
Owner

This is really nice, thanks for your contribution! 😄

I just wrote a couple of comments, after that I will merge it and then add a new entry to the Wiki.

@d3473r
Copy link
Contributor Author

d3473r commented Jan 11, 2020

This is really nice, thanks for your contribution! 😄

I just wrote a couple of comments, after that I will merge it and then add a new entry to the Wiki.

Ahhh sure :D, I overlooked that.

@eddiesigner eddiesigner merged commit f3e8027 into eddiesigner:master Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants