Skip to content

merge: Merge branch 'dev' #67

merge: Merge branch 'dev'

merge: Merge branch 'dev' #67

Workflow file for this run

name: Deploy to Cloudflare Workers
on:
push:
branches: [ "master" ]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: touch wrangler.toml
- run: |
cat << 'EOF' > wrangler.toml
${{secrets.WRANGLER_TOML}}
EOF
- run: npm install
- run: CLOUDFLARE_API_TOKEN=${{ secrets.CF_API_TOKEN }} npm run wrangler deploy --config=wrangler.toml > /dev/null
- name: Check CF_WORKERS_DOMAIN exists
run: |
url=${{ secrets.CF_WORKERS_DOMAIN }}
if [ -z "$url" ]; then
echo "CF_WORKERS_DOMAIL does not exist"
else
echo "CF_WORKERS_DOMAIN exists"
curl -s -o /dev/null https://$url/init
fi