Skip to content

Commit 773eb5d

Browse files
authored
Contentful exodus (#5479)
2 parents a934195 + ec894eb commit 773eb5d

483 files changed

Lines changed: 189957 additions & 2078 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.envrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ watch_file devShell.nix
99

1010
export DIRENV_WARN_TIMEOUT=2m
1111
# ^ our devShell is big
12-
export GIT_LFS_SKIP_SMUDGE=true
13-
# ^ waiting for Nix to fix LFS support: https://github.com/NixOS/nix/pull/10153
12+
# export GIT_LFS_SKIP_SMUDGE=true
13+
# # ^ waiting for Nix to fix LFS support: https://github.com/NixOS/nix/pull/10153

.github/workflows/deploy-site.yml

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
name: Deploy Site
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release/site
8+
paths:
9+
- 'site/**'
10+
pull_request:
11+
paths:
12+
- 'site/**'
13+
workflow_dispatch:
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
env:
20+
NODE_OPTIONS: '--no-warnings'
21+
ACTIONS_RUNNER_DEBUG: true
22+
23+
jobs:
24+
deploy-preview:
25+
runs-on: ['ubuntu-latest']
26+
permissions:
27+
contents: read
28+
pull-requests: write
29+
env:
30+
npm_config_yes: true
31+
ENVIRONMENT: 'preview'
32+
environment: 'site-preview'
33+
if: github.event_name == 'pull_request'
34+
steps:
35+
- uses: actions/checkout@v4
36+
with:
37+
lfs: true
38+
- name: Use node v24
39+
uses: actions/setup-node@v6
40+
with:
41+
node-version: 24
42+
- uses: cachix/install-nix-action@v31
43+
with:
44+
extra_nix_config: |
45+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= union.cachix.org-1:TV9o8jexzNVbM1VNBOq9fu8NK+hL6ZhOyOh0quATy+M=
46+
trusted-substituters = https://cache.nixos.org https://cache.garnix.io https://union.cachix.org
47+
- name: Fetch from Cache
48+
env:
49+
ENVIRONMENT: ${{ env.ENVIRONMENT }}
50+
run: |
51+
nix build .#site
52+
- name: '[preview] 🔶 Publish to Cloudflare Pages'
53+
env:
54+
ENVIRONMENT: ${{ env.ENVIRONMENT }}
55+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
56+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }}
57+
run: npx --yes wrangler@latest pages --project-name="union-site" deploy result >> /tmp/site_deploy.txt
58+
59+
- name: Set Deploy Output
60+
run: |
61+
{
62+
echo 'DEPLOY_OUTPUT<<EOF'
63+
tail -n 2 /tmp/site_deploy.txt
64+
echo 'EOF'
65+
} >> "$GITHUB_ENV"
66+
67+
- name: Comment Site Deploy Results
68+
uses: thollander/actions-comment-pull-request@v2
69+
with:
70+
message: |
71+
# Site 🤌
72+
${{ env.DEPLOY_OUTPUT }}
73+
74+
**${{ env.LAST_UPDATED_AT }}**
75+
comment_tag: deploy-site-preview-result
76+
77+
deploy-manual:
78+
runs-on: ['ubuntu-latest']
79+
env:
80+
npm_config_yes: true
81+
ENVIRONMENT: 'preview'
82+
if: github.event_name == 'workflow_dispatch'
83+
steps:
84+
- uses: actions/checkout@v4
85+
with:
86+
lfs: true
87+
- name: Use node v24
88+
uses: actions/setup-node@v6
89+
with:
90+
node-version: 24
91+
- uses: cachix/install-nix-action@v31
92+
with:
93+
extra_nix_config: |
94+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= union.cachix.org-1:TV9o8jexzNVbM1VNBOq9fu8NK+hL6ZhOyOh0quATy+M=
95+
trusted-substituters = https://cache.nixos.org https://cache.garnix.io https://union.cachix.org
96+
- name: Fetch from Cache
97+
env:
98+
ENVIRONMENT: ${{ env.ENVIRONMENT }}
99+
run: |
100+
nix build .#site
101+
- name: '[workflow-dispatch] 🔶 Publish to Cloudflare Pages'
102+
env:
103+
ENVIRONMENT: ${{ env.ENVIRONMENT }}
104+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
105+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }}
106+
run: npx --yes wrangler@latest pages --project-name="union-site" deploy result
107+
108+
deploy-staging:
109+
runs-on: ['ubuntu-latest']
110+
env:
111+
npm_config_yes: true
112+
ENVIRONMENT: 'staging'
113+
environment: 'site-staging'
114+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
115+
steps:
116+
- uses: actions/checkout@v4
117+
with:
118+
lfs: true
119+
- name: Use node v24
120+
uses: actions/setup-node@v6
121+
with:
122+
node-version: 24
123+
- uses: cachix/install-nix-action@v31
124+
with:
125+
extra_nix_config: |
126+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= union.cachix.org-1:TV9o8jexzNVbM1VNBOq9fu8NK+hL6ZhOyOh0quATy+M=
127+
trusted-substituters = https://cache.nixos.org https://cache.garnix.io https://union.cachix.org
128+
- name: Fetch from Cache
129+
env:
130+
ENVIRONMENT: ${{ env.ENVIRONMENT }}
131+
run: |
132+
nix build .#site
133+
- name: '[staging] 🔶 Publish to Cloudflare Pages'
134+
env:
135+
ENVIRONMENT: ${{ env.ENVIRONMENT }}
136+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
137+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }}
138+
run: npx --yes wrangler@latest pages --project-name="union-site" --branch="staging" deploy result
139+
140+
deploy-production:
141+
runs-on: ['ubuntu-latest']
142+
env:
143+
npm_config_yes: true
144+
ENVIRONMENT: 'production'
145+
environment: 'site-production'
146+
if: github.event_name == 'push' && github.ref == 'refs/heads/release/site'
147+
steps:
148+
- uses: actions/checkout@v4
149+
with:
150+
lfs: true
151+
- name: Use node v24
152+
uses: actions/setup-node@v6
153+
with:
154+
node-version: 24
155+
- uses: cachix/install-nix-action@v31
156+
with:
157+
extra_nix_config: |
158+
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= union.cachix.org-1:TV9o8jexzNVbM1VNBOq9fu8NK+hL6ZhOyOh0quATy+M=
159+
trusted-substituters = https://cache.nixos.org https://cache.garnix.io https://union.cachix.org
160+
- name: Fetch from Cache
161+
env:
162+
ENVIRONMENT: ${{ env.ENVIRONMENT }}
163+
run: |
164+
nix build .#site
165+
- name: '[production] 🔶 Publish to Cloudflare Pages'
166+
env:
167+
ENVIRONMENT: ${{ env.ENVIRONMENT }}
168+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
169+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_WORKERS_API_TOKEN }}
170+
run: npx --yes wrangler@latest pages --project-name="union-site" --branch="main" deploy result

0 commit comments

Comments
 (0)