-
Notifications
You must be signed in to change notification settings - Fork 5
168 lines (155 loc) · 6.81 KB
/
push.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: ' 🔀️ Push'
on:
push:
branches:
- main
# # prerelease branches
# - canary
# - develop
# - ci/**
# - feature/**
# - fix/**
# - refactor/**
# - release/**
concurrency:
group: push-${{ github.ref }}-1
cancel-in-progress: true
env:
GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
GH_DEPLOY_TOKEN: ${{ secrets.GH_DEPLOY_TOKEN }}
GH_TOKEN: ${{ secrets.GH_DEPLOY_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
NEXT_PUBLIC__FATHOM_SITE_ID: ${{ secrets.NEXT_PUBLIC__FATHOM_SITE_ID }}
NEXT_PUBLIC__SITE: ${{ vars.NEXT_PUBLIC__SITE }}
NEXT_TELEMETRY_DISABLED: ${{ vars.NEXT_TELEMETRY_DISABLED }}
NOTION__DATABASE__BLOG: ${{ secrets.NOTION__DATABASE__BLOG }}
NOTION__DATABASE__BOOKS: ${{ secrets.NOTION__DATABASE__BOOKS }}
NOTION__DATABASE__EPISODES: ${{ secrets.NOTION__DATABASE__EPISODES }}
NOTION__DATABASE__EVENTS: ${{ secrets.NOTION__DATABASE__EVENTS }}
NOTION__DATABASE__PAGES: ${{ secrets.NOTION__DATABASE__PAGES }}
NOTION__DATABASE__PEOPLE: ${{ secrets.NOTION__DATABASE__PEOPLE }}
NOTION__DATABASE__PODCASTS: ${{ secrets.NOTION__DATABASE__PODCASTS }}
NOTION__DATABASE__SHOWS: ${{ secrets.NOTION__DATABASE__SHOWS }}
NOTION__DATABASE__VENUES: ${{ secrets.NOTION__DATABASE__VENUES }}
NOTION_API_KEY: ${{ secrets.NOTION_API_KEY }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
OCTOKIT_TOKEN: ${{ secrets.OCTOKIT_TOKEN }}
OG_API_KEY: ${{ secrets.OG_API_KEY }}
PREVIEW_TOKEN: ${{ secrets.PREVIEW_TOKEN }}
REDIS_URL: ${{ secrets.REDIS_URL }}
REVALIDATE_TOKEN: ${{ secrets.REVALIDATE_TOKEN }}
SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }}
SPOTIFY_CLIENT_SECRET: ${{ secrets.SPOTIFY_CLIENT_SECRET }}
SPOTIFY_REFRESH_TOKEN: ${{ secrets.SPOTIFY_REFRESH_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
UPSTASH_REDIS_REST_TOKEN: ${{ secrets.UPSTASH_REDIS_REST_TOKEN }}
UPSTASH_REDIS_REST_URL: ${{ secrets.UPSTASH_REDIS_REST_URL }}
VERCEL_ENV: ${{ vars.VERCEL_ENV }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
jobs:
pull:
name: '👷️ CI'
if: (contains(github.event.head_commit.message, '[b]') || github.ref == 'refs/heads/main') && !contains(github.event.head_commit.message, '[skip ci]')
timeout-minutes: 20
runs-on: ubuntu-latest
env:
GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
GH_DEPLOY_TOKEN: ${{ secrets.GH_DEPLOY_TOKEN }}
GH_TOKEN: ${{ secrets.GH_DEPLOY_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
NEXT_PUBLIC__FATHOM_SITE_ID: ${{ secrets.NEXT_PUBLIC__FATHOM_SITE_ID }}
NEXT_PUBLIC__SITE: ${{ vars.NEXT_PUBLIC__SITE }}
NEXT_TELEMETRY_DISABLED: ${{ vars.NEXT_TELEMETRY_DISABLED }}
NOTION__DATABASE__BLOG: ${{ secrets.NOTION__DATABASE__BLOG }}
NOTION__DATABASE__BOOKS: ${{ secrets.NOTION__DATABASE__BOOKS }}
NOTION__DATABASE__EPISODES: ${{ secrets.NOTION__DATABASE__EPISODES }}
NOTION__DATABASE__EVENTS: ${{ secrets.NOTION__DATABASE__EVENTS }}
NOTION__DATABASE__PAGES: ${{ secrets.NOTION__DATABASE__PAGES }}
NOTION__DATABASE__PEOPLE: ${{ secrets.NOTION__DATABASE__PEOPLE }}
NOTION__DATABASE__PODCASTS: ${{ secrets.NOTION__DATABASE__PODCASTS }}
NOTION__DATABASE__SHOWS: ${{ secrets.NOTION__DATABASE__SHOWS }}
NOTION__DATABASE__VENUES: ${{ secrets.NOTION__DATABASE__VENUES }}
NOTION_API_KEY: ${{ secrets.NOTION_API_KEY }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
OCTOKIT_TOKEN: ${{ secrets.OCTOKIT_TOKEN }}
OG_API_KEY: ${{ secrets.OG_API_KEY }}
PREVIEW_TOKEN: ${{ secrets.PREVIEW_TOKEN }}
REDIS_URL: ${{ secrets.REDIS_URL }}
REVALIDATE_TOKEN: ${{ secrets.REVALIDATE_TOKEN }}
SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }}
SPOTIFY_CLIENT_SECRET: ${{ secrets.SPOTIFY_CLIENT_SECRET }}
SPOTIFY_REFRESH_TOKEN: ${{ secrets.SPOTIFY_REFRESH_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
UPSTASH_REDIS_REST_TOKEN: ${{ secrets.UPSTASH_REDIS_REST_TOKEN }}
UPSTASH_REDIS_REST_URL: ${{ secrets.UPSTASH_REDIS_REST_URL }}
VERCEL_ENV: ${{ vars.VERCEL_ENV }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
steps:
- name: '🐙️ Checkout'
id: push-checkout
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: '💽️ Init'
id: push-init
uses: JeromeFitz/websites/.github/actions/init@main
- name: '📦 Install'
id: push-install
uses: JeromeFitz/websites/.github/actions/install@main
- name: '🔺️ Cache (vercel)'
id: push-cache-vercel
uses: JeromeFitz/websites/.github/actions/cache-turbo@main
with:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
- name: '🚨️ Lint'
id: push-lint
uses: JeromeFitz/websites/.github/actions/lint@main
with:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
- name: '🧪 Test'
id: push-test
uses: JeromeFitz/websites/.github/actions/test@main
with:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
WEBSITE: 'jeromefitzgerald.com'
# https://docs.github.com/en/actions/learn-github-actions/expressions
- name: '📛 Commit Message'
id: push-commit-message
run: |
echo "message=$(git log --no-merges -1 --oneline)" >> $GITHUB_OUTPUT
- name: '🎭 E2E'
id: push-e2e
if: ${{ contains(steps.push-commit-message.outputs.message, '[b]') }}
uses: JeromeFitz/websites/.github/actions/e2e@main
with:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
VERCEL_ENV: ${{ vars.VERCEL_ENV }}
WEBSITE: 'jeromefitzgerald.com'
- name: '🏷️ Release'
id: push-release
uses: JeromeFitz/websites/.github/actions/release@main
with:
GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
- name: '🔺️ Deploy (Production)'
id: push-deploy
if: github.ref == 'refs/heads/main'
uses: JeromeFitz/websites/.github/actions/deploy@main
with:
GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
PRODUCTION: true