Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 37 additions & 6 deletions .github/workflows/deploy-theme.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,48 @@
# Learn more → https://github.com/TryGhost/action-deploy-theme#getting-started
name: Deploy Theme

on:
push:
branches:
- master
- main

permissions:
contents: read

jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false

- uses: pnpm/action-setup@ac6db6d3c1f721f886538a378a2d73e85697340a

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: lts/*
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- run: pnpm install --frozen-lockfile

- run: pnpm test:ci

deploy:
runs-on: ubuntu-24.04
name: Deploy
runs-on: ubuntu-latest
needs: test

steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Deploy Ghost Theme
uses: TryGhost/action-deploy-theme@a0ee1147d15641db25681e54549c4db9a53c2629 # v1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false

- name: Deploy theme
uses: TryGhost/action-deploy-theme@a0ee1147d15641db25681e54549c4db9a53c2629
with:
api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}
api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test

on:
pull_request:

permissions:
contents: read

jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false

- uses: pnpm/action-setup@ac6db6d3c1f721f886538a378a2d73e85697340a

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: lts/*
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- run: pnpm install --frozen-lockfile

- run: pnpm test
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Restart Ghost and select the Starter theme from **Settings**.
From the theme's root directory, install the dependencies:

```bash
npm install
pnpm install
```

If Node isn't installed, follow the [official Node installation guide](https://nodejs.org/).
Expand All @@ -87,7 +87,7 @@ If Node isn't installed, follow the [official Node installation guide](https://n
From the Starter theme folder, start development mode:

```bash
npm run dev
pnpm dev
```

Changes you make to your styles, scripts, and Handlebars files will show up automatically in the browser. CSS and Javascript will be compiled and output to the `built` folder.
Expand All @@ -101,19 +101,19 @@ Press `ctrl + c` in the terminal to exit development mode.
Compile your CSS and JavaScript assets for production with the following command:

```bash
npm run build
pnpm build
```

Create a zip archive:

```bash
npm run zip
pnpm zip
```

Use `gscan` to test your theme for compatibility with Ghost:

```bash
npm run test
pnpm test
```

 
Expand Down
Loading