Files
hotfridge/.github/workflows/deploy.yml
T
dmgnr 76782541b0
Deploy to Cloudflare Pages / deploy (push) Successful in 1m29s
move Gemini requests server side
2026-08-24 12:20:16 +00:00

40 lines
1.3 KiB
YAML

name: Deploy to Cloudflare Pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
# Optional: Add your build steps here if your project needs compilation
- name: Install Dependencies & Build
run: |
echo "GUIDE_JOB_SECRET=${{ secrets.GUIDE_JOB_SECRET }}" >> .env
bun i --frozen-lockfile
bun run build
- name: Configure Pages Secrets
run: |
printf '%s' "$GEMINI_API_KEYS" | bunx wrangler pages secret put GEMINI_API_KEYS --project-name=hotfridge
printf '%s' "$GUIDE_JOB_SECRET" | bunx wrangler pages secret put GUIDE_JOB_SECRET --project-name=hotfridge
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
GEMINI_API_KEYS: ${{ secrets.GEMINI_API_KEYS }}
GUIDE_JOB_SECRET: ${{ secrets.GUIDE_JOB_SECRET }}
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy .svelte-kit/cloudflare --project-name=hotfridge