-
Notifications
You must be signed in to change notification settings - Fork 10
33 lines (27 loc) · 984 Bytes
/
workers.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
33
name: Deploy to Cloudflare Workers Sites
on: [push]
jobs:
deploy-main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache yarn dependencies
uses: c-hive/gha-yarn-cache@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- run: yarn install --frozen-lockfile
- run: yarn generate
- name: Publish to Cloudflare Workers Sites
run: |
mkdir -p ~/.wrangler/config/
echo "api_token=\"${CF_API_TOKEN}\"" > ~/.wrangler/config/default.toml
yarn wrangler publish --env production
env:
SECRETS_ENC_KEY: ${{ secrets.SECRETS_ENC_KEY }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CF_ZONE_ID: ${{ secrets.CF_ZONE_ID }}
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}