Skip to content

Deploy to Cloudflare Pages #11

Deploy to Cloudflare Pages

Deploy to Cloudflare Pages #11

Workflow file for this run

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 }}