diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..47db5e9 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,40 @@ +name: Deploy + +on: + push: + branches: + - main + paths: + - 'website/**' + - '.github/workflows/deploy.yml' + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + defaults: + run: + working-directory: website + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + cache-dependency-path: website/package-lock.json + + - name: Install dependencies + run: npm ci + + - name: Build site + run: npm run build + + - name: Deploy to Cloudflare + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + workingDirectory: website + command: deploy diff --git a/CLAUDE.md b/CLAUDE.md index b791c5a..57f7998 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -100,5 +100,14 @@ website/ GitHub Actions workflows in `.github/workflows/`: - **build.yml** - Build validation on push/PR +- **deploy.yml** - Deploy to Cloudflare Pages on push to main - **commit-lint.yml** - Validate PR titles follow conventional commits - **contributors.yml** - Auto-update contributors in README + +## Deployment + +The site is deployed to Cloudflare Pages using Wrangler. + +- **Configuration:** `website/wrangler.toml` +- **Deploy trigger:** Push to main (changes to `website/**`) +- **Required secret:** `CLOUDFLARE_API_TOKEN` diff --git a/website/wrangler.toml b/website/wrangler.toml new file mode 100644 index 0000000..831028e --- /dev/null +++ b/website/wrangler.toml @@ -0,0 +1,5 @@ +name = "dtvem-io" +compatibility_date = "2024-12-01" + +[assets] +directory = "./dist"