forked from ubiquity/work.ubq.fi
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.55 KB
/
deploy.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
name: Deploy to Cloudflare Pages
on:
workflow_dispatch:
workflow_run:
workflows: ["Build"]
types:
- completed
jobs:
write-secrets-to-wrangler:
name: Write secrets to wrangler.toml
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Write secrets to wrangler.toml
run: |
sed -i 's/SUPABASE_URL = ""/SUPABASE_URL = "${{secrets.SUPABASE_URL}}"/g' wrangler.toml
sed -i 's/SUPABASE_ANON_KEY = ""/SUPABASE_ANON_KEY = "${{secrets.SUPABASE_ANON_KEY}}"/g' wrangler.toml
env:
VOYAGE_API_KEY: ${{ secrets.VOYAGEAI_API_KEY }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
deploy-to-cloudflare:
name: Automatic Cloudflare Deploy
runs-on: ubuntu-22.04
steps:
- name: Deploy to Cloudflare
uses: ubiquity/cloudflare-deploy-action@main
with:
repository: ${{ github.repository }}
production_branch: ${{ github.event.repository.default_branch }}
build_artifact_name: "static"
output_directory: "static"
current_branch: ${{ github.event.workflow_run.head_branch }}
cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
commit_sha: ${{ github.event.workflow_run.head_sha }}
workflow_run_id: ${{ github.event.workflow_run.id }}
app_id: ${{ secrets.APP_ID }}
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}