forked from haibbo/cf-openai-azure-proxy
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (41 loc) · 1.46 KB
/
cf-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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Cloudflare Workers
on:
push:
branches: [ main ]
workflow_dispatch:
defaults:
run:
shell: bash
working-directory: ./
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup serverless
uses: Teakowa/setup-serverless@v2
with:
provider: cloudflare-workers
env:
CLOUDFLARE_AUTH_KEY: ${{ secrets.CLOUDFLARE_AUTH_KEY }}
CLOUDFLARE_AUTH_EMAIL: ${{ secrets.CLOUDFLARE_AUTH_EMAIL }}
- name: Deploy
run: |
sls plugin install -n serverless-cloudflare-workers
sls deploy
env:
CLOUDFLARE_AUTH_KEY: ${{ secrets.CLOUDFLARE_AUTH_KEY }}
CLOUDFLARE_AUTH_EMAIL: ${{ secrets.CLOUDFLARE_AUTH_EMAIL }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE_WORKER_NAME: ${{ secrets.CLOUDFLARE_WORKER_NAME == '' && 'openai-azure-proxy' || secrets.CLOUDFLARE_WORKER_NAME }}
RESOURCE_NAME: ${{ secrets.RESOURCE_NAME }}
DEPLOY_NAME_GPT35: ${{ secrets.DEPLOY_NAME_GPT35 }}
DEPLOY_NAME_GPT35_16K: ${{ secrets.DEPLOY_NAME_GPT35_16K }}
DEPLOY_NAME_GPT4: ${{ secrets.DEPLOY_NAME_GPT4 }}
DEPLOY_NAME_GPT4_32K: ${{ secrets.DEPLOY_NAME_GPT4_32K }}