diff --git a/.github/workflows/deploy-worker.yml b/.github/workflows/deploy-worker.yml new file mode 100644 index 0000000..aabf8a5 --- /dev/null +++ b/.github/workflows/deploy-worker.yml @@ -0,0 +1,22 @@ +name: Deploy Worker + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Deploy Worker + run: | + curl -X PUT "https://api.cloudflare.com/client/v4/accounts/${{ secrets.CF_ACCOUNT_ID }}/workers/scripts/tings-cloudy/worker.js" \ + -H "X-Auth-Email: ${{ secrets.CF_API_EMAIL }}" \ + -H "Authorization: Bearer ${{ secrets.CF_API_KEY }}" \ + -H "Content-Type: application/javascript" \ + --data-binary "@_backend/worker.js" diff --git a/wrangler.toml b/wrangler.toml new file mode 100644 index 0000000..185533d --- /dev/null +++ b/wrangler.toml @@ -0,0 +1,4 @@ +[[r2_buckets]] +binding = "ting-storage" +bucket_name = "ting-storage" +preview_bucket_name = "ting-storage" \ No newline at end of file