-
-
Notifications
You must be signed in to change notification settings - Fork 81
67 lines (64 loc) · 2.11 KB
/
Copy pathjournal.yml
File metadata and controls
67 lines (64 loc) · 2.11 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Journal
on:
pull_request:
push:
branches:
- main
- 'renovate/*'
paths:
- 'packages/journal/**'
- '.github/workflows/journal.yml'
permissions:
contents: read
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- run: pnpm install --frozen-lockfile
- run: pnpm test:ci --theme journal
all-tests-pass:
name: All tests pass
if: always()
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Verify all required jobs succeeded
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Deploy theme
uses: TryGhost/action-deploy-theme@57d2c493d3fc90d624bb9b906d29066c61bbbfe1 # v2
with:
api-url: ${{ secrets.JOURNAL_GHOST_ADMIN_API_URL }}
api-key: ${{ secrets.JOURNAL_GHOST_ADMIN_API_KEY }}
working-directory: packages/journal
subtree:
name: Subtree
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
fetch-depth: 0
- uses: nxtlvlsoftware/git-subtree-action@3d555981a570a2275a91c07b04b38d5e90d48c05 # 1.1
with:
repo: 'TryGhost/Journal'
path: 'packages/journal'
deploy_key: ${{secrets.JOURNAL_GITHUB_DEPLOY_KEY}}
force: true