Skip to content

Commit c6641ae

Browse files
authored
Merge pull request #17 from wavezync/ci/site-deploy
ci(site): deploy durable.wavezync.com from GitHub Actions
2 parents 2b6e170 + 7911735 commit c6641ae

2 files changed

Lines changed: 64 additions & 1 deletion

File tree

‎.github/workflows/site.yml‎

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Site
2+
3+
# durable.wavezync.com (site/). Builds on PRs; deploys to Cloudflare Workers on
4+
# main. The site reads the packages' docs, mix.exs and lib/, so changes there
5+
# rebuild it too. Needs the CLOUDFLARE_API_TOKEN secret ("Edit Cloudflare
6+
# Workers" token for the WaveZync account).
7+
8+
on:
9+
push:
10+
branches: [main]
11+
paths: &paths
12+
- "site/**"
13+
- "shared.exs"
14+
- "durable/*.md"
15+
- "durable/guides/**"
16+
- "durable/lib/**"
17+
- "durable/mix.exs"
18+
- "durable_dashboard/*.md"
19+
- "durable_dashboard/mix.exs"
20+
- ".github/workflows/site.yml"
21+
pull_request:
22+
branches: [main]
23+
paths: *paths
24+
workflow_dispatch:
25+
26+
concurrency:
27+
group: site-${{ github.ref }}
28+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
29+
30+
jobs:
31+
site:
32+
name: Build and deploy
33+
runs-on: ubuntu-latest
34+
defaults:
35+
run:
36+
working-directory: site
37+
steps:
38+
- uses: actions/checkout@v6
39+
40+
- name: Set up pnpm
41+
uses: pnpm/action-setup@v6
42+
with:
43+
version: 10
44+
45+
- name: Set up Node
46+
uses: actions/setup-node@v6
47+
with:
48+
node-version: "24"
49+
cache: pnpm
50+
cache-dependency-path: site/pnpm-lock.yaml
51+
52+
- name: Install dependencies
53+
run: pnpm install --frozen-lockfile
54+
55+
- name: Build
56+
run: pnpm run build
57+
58+
- name: Deploy to Cloudflare
59+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
60+
env:
61+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
62+
run: pnpm exec wrangler deploy

‎site/wrangler.jsonc‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// durable.wavezync.com: the built Astro site (dist/), served as Workers static assets.
22
// The site is fully static, so there is no Worker script (`main`) and no ASSETS binding.
3-
// `pnpm run deploy` builds the site and deploys it.
3+
// `pnpm run deploy` builds the site and deploys it; CI deploys main (.github/workflows/site.yml).
44
{
55
"$schema": "node_modules/wrangler/config-schema.json",
66
"name": "durable",
7+
"account_id": "f69696ea6aec9975d75a770144674386",
78
"compatibility_date": "2026-10-01",
89
"assets": {
910
"directory": "./dist",

0 commit comments

Comments
 (0)