Skip to content

deploy

deploy #27

Workflow file for this run

name: Deploy to Cloudflare Workers
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Create wrangler.toml
env:
USERNAME: ${{ secrets.USERNAME || 'default_username' }}
PASSWORD: ${{ secrets.PASSWORD || 'default_password' }}
BUCKET_NAME: ${{ secrets.BUCKET_NAME || 'default_bucket_name' }}
run: |
sed -e "s/\$USERNAME/$USERNAME/g" \
-e "s/\$PASSWORD/$PASSWORD/g" \
-e "s/\$BUCKET_NAME/$BUCKET_NAME/g" \
wrangler.toml.template > wrangler.toml
cat wrangler.toml
- name: Build & Deploy Worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}