Skip to content

Commit 5744636

Browse files
committed
Tooling: Extract website deploy into own workflow
- Standalone deploy so CI can be disabled temporarily without losing auto-deploy on push to main - Uses `paths` filter to only trigger on website file changes
1 parent 812ad07 commit 5744636

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Deploy website
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'apps/website/**'
9+
- '.dockerignore'
10+
- 'CHANGELOG.md'
11+
12+
jobs:
13+
deploy:
14+
name: Deploy website
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Trigger deploy webhook
19+
run: |
20+
# Compute HMAC-SHA256 signature
21+
PAYLOAD='{}'
22+
SIGNATURE=$(echo -n "$PAYLOAD" | openssl dgst -sha256 -hmac "${{ secrets.DEPLOY_WEBHOOK_SECRET }}" | cut -d' ' -f2)
23+
24+
# Send signed request to webhook
25+
curl -f -X POST https://getcmdr.com/hooks/deploy-website \
26+
-H "Content-Type: application/json" \
27+
-H "X-Hub-Signature-256: sha256=$SIGNATURE" \
28+
-d "$PAYLOAD"

0 commit comments

Comments
 (0)