doesitarm/.github/workflows/deploy-cloudflare-workers.yml
2022-02-03 21:32:34 -06:00

28 lines
833 B
YAML

# https://github.com/marketplace/actions/deploy-to-cloudflare-workers-with-wrangler
# https://github.com/cloudflare/wrangler-action
name: Deploy to Cloudflare Workers with Wrangler
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
steps:
- uses: actions/checkout@master
- name: Write Wrangler config
run: |
echo ${{ secrets.WRANGLER_ENV }} | base64 -d > doesitarm-default/.env
cat doesitarm-default/.env
echo ${{ secrets.WRANGLER_TOML }} | base64 -d > doesitarm-default/wrangler.toml
cat doesitarm-default/wrangler.toml
npm install
- name: Deploy Worker
uses: cloudflare/wrangler-action@1.3.0
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
workingDirectory: 'doesitarm-default'