-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (45 loc) · 1.57 KB
/
deploy.yml
File metadata and controls
55 lines (45 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Deploy to Cloudflare Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
deployments: write
concurrency:
group: pages-deploy-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Build static site
run: npm run build
- name: Sync secrets to Cloudflare Pages
if: ${{ env.BUTTONDOWN_API_KEY != '' }}
env:
BUTTONDOWN_API_KEY: ${{ secrets.BUTTONDOWN_API_KEY }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: echo "$BUTTONDOWN_API_KEY" | npx wrangler pages secret put BUTTONDOWN_API_KEY --project-name=proactive-agents
- name: Publish to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
wranglerVersion: "4"
command: pages deploy ./out --project-name=proactive-agents --branch=${{ github.ref_name }}
- name: Upsert relaycron schedules
if: ${{ env.RELAYCRON_API_KEY != '' }}
env:
RELAYCRON_API_KEY: ${{ secrets.RELAYCRON_API_KEY }}
CRON_WEBHOOK_SECRET: ${{ secrets.CRON_WEBHOOK_SECRET }}
run: npx tsx scripts/register-schedules.ts