Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Site

# durable.wavezync.com (site/). Builds on PRs; deploys to Cloudflare Workers on
# main. The site reads the packages' docs, mix.exs and lib/, so changes there
# rebuild it too. Needs the CLOUDFLARE_API_TOKEN secret ("Edit Cloudflare
# Workers" token for the WaveZync account).

on:
push:
branches: [main]
paths: &paths
- "site/**"
- "shared.exs"
- "durable/*.md"
- "durable/guides/**"
- "durable/lib/**"
- "durable/mix.exs"
- "durable_dashboard/*.md"
- "durable_dashboard/mix.exs"
- ".github/workflows/site.yml"
pull_request:
branches: [main]
paths: *paths
workflow_dispatch:

concurrency:
group: site-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
site:
name: Build and deploy
runs-on: ubuntu-latest
defaults:
run:
working-directory: site
steps:
- uses: actions/checkout@v6

- name: Set up pnpm
uses: pnpm/action-setup@v6
with:
version: 10

- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: "24"
cache: pnpm
cache-dependency-path: site/pnpm-lock.yaml

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm run build

- name: Deploy to Cloudflare
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: pnpm exec wrangler deploy
3 changes: 2 additions & 1 deletion site/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// durable.wavezync.com: the built Astro site (dist/), served as Workers static assets.
// The site is fully static, so there is no Worker script (`main`) and no ASSETS binding.
// `pnpm run deploy` builds the site and deploys it.
// `pnpm run deploy` builds the site and deploys it; CI deploys main (.github/workflows/site.yml).
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "durable",
"account_id": "f69696ea6aec9975d75a770144674386",
"compatibility_date": "2026-10-01",
"assets": {
"directory": "./dist",
Expand Down
Loading