-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (88 loc) · 2.79 KB
/
deploy-ghost-theme.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# https://github.com/marketplace/actions/deploy-ghost-theme
# https://github.com/getsentry/action-release
name: Deploy Theme
on:
push:
branches:
- master
- main
- prod
- add_techchecks_page
jobs:
versioning:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history and tags
- name: Generate Semantic Version
id: version
uses: PaulHatch/[email protected]
with:
tag_prefix: "v"
major_pattern: "(MAJOR)"
minor_pattern: "(MINOR)"
# Additional parms here...
- name: Print new version
run: echo "New version is ${{ steps.version.outputs.version }}"
- name: Configure Git user
run: |
git config user.name "${{ secrets.BOT_NAME }}"
git config user.email "${{ secrets.BOT_EMAIL }}"
- name: Tag the new version
run: |
git tag v${{ steps.version.outputs.version }}
git push origin v${{ steps.version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
outputs:
version: ${{ steps.version.outputs.version }}
create-release:
needs: versioning
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create Release
uses: ncipollo/[email protected]
with:
artifacts: "" # You can specify the artifacts to upload here
body: "Auto-generated release from v${{ needs.versioning.outputs.version }}"
name: "Release v${{ needs.versioning.outputs.version }}"
tag: "v${{ needs.versioning.outputs.version }}"
token: ${{ secrets.BOT_TOKEN }}
configure-sentry:
needs: versioning
name: Configure Sentry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
with:
environment: production
version: ${{ needs.versioning.outputs.version }}
deploy-ghost:
runs-on: ubuntu-22.04
needs: configure-sentry
steps:
- uses: actions/checkout@v3
- name: Deploy Ghost Theme
uses: TryGhost/action-deploy-theme@v1
with:
api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}
exclude: ".nova .editorconfig docs/*"
theme-name: "Govsper"