diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..15fa011 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,30 @@ +name: Deploy to Cloudflare Worker + +on: + push: + branches: + - main + pull_request: + branches: + - main + repository_dispatch: +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + deploy: + runs-on: ubuntu-latest + timeout-minutes: 60 + needs: build + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Wrangler CLI + uses: cloudflare/wrangler-action@1.3.0 + with: + apiToken: ${{ secrets.CF_API_TOKEN }}