-
-
Notifications
You must be signed in to change notification settings - Fork 64
48 lines (47 loc) · 1.32 KB
/
headline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Headline
on:
pull_request:
push:
branches:
- main
- 'renovate/*'
paths:
- 'packages/headline/**'
- '.github/workflows/headline.yml'
jobs:
test:
name: Test
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
steps:
- uses: actions/checkout@v4
- run: yarn
- run: yarn test:ci --theme headline
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Deploy theme
uses: TryGhost/action-deploy-theme@v1
with:
api-url: ${{ secrets.HEADLINE_GHOST_ADMIN_API_URL }}
api-key: ${{ secrets.HEADLINE_GHOST_ADMIN_API_KEY }}
working-directory: packages/headline
subtree:
name: Subtree
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: nxtlvlsoftware/git-subtree-action@1.1
with:
repo: 'TryGhost/Headline'
path: 'packages/headline'
deploy_key: ${{secrets.HEADLINE_GITHUB_DEPLOY_KEY}}
force: true