-
-
Notifications
You must be signed in to change notification settings - Fork 5
32 lines (30 loc) · 981 Bytes
/
deploy-worker.yml
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
name: Deploy to Cloudflare Workers
on:
workflow_dispatch:
push:
branches:
- master
paths:
- workers/**
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy Worker
steps:
- uses: actions/checkout@v2
- name: Set Up Node.js
uses: actions/setup-node@v1
with:
node-version: "16.x"
- run: npm install
- run: npm run build
env:
CLOUDFLARE_ACCOUNTID: ${{ secrets.CLOUDFLARE_ACCOUNTID }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
CLOUDFLARE_ZONEID: ${{ secrets.CLOUDFLARE_ZONEID }}
DIRECTUS_ACCESS_TOKEN: ${{ secrets.DIRECTUS_ACCESS_TOKEN }}
DIRECTUS_CF_CACHE_KV: ${{ secrets.DIRECTUS_CF_CACHE_KV }}
DIRECTUS_SERVER_URL: ${{ secrets.DIRECTUS_SERVER_URL }}
DIRECTUS_WEBHOOK_SECRET: ${{ secrets.DIRECTUS_WEBHOOK_SECRET }}
WORKER_ROUTES: ${{ secrets.WORKER_ROUTES }}
- run: npm run deploy