From f6d5304dd1d0b7d9279eb1f653692b7663bcd1c1 Mon Sep 17 00:00:00 2001 From: Amir Mohammadi Date: Fri, 24 May 2024 12:57:59 +0330 Subject: [PATCH] deploy to cf workers --- .github/workflows/cf.yml | 17 +++++++++++++++++ README.md | 9 ++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cf.yml diff --git a/.github/workflows/cf.yml b/.github/workflows/cf.yml new file mode 100644 index 0000000..f9d810e --- /dev/null +++ b/.github/workflows/cf.yml @@ -0,0 +1,17 @@ +name: cf workers + +on: + push: + branches: + - master + +jobs: + deploy: + runs-on: ubuntu-latest + environment: cf + steps: + - uses: actions/checkout@v4 + - name: deploy + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} diff --git a/README.md b/README.md index bd97d12..cac0209 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,14 @@ # tunl a serverless v2ray tunnel -## Quick Start +## Deploy + +### Easy Deploy (recommended) +click on the button below: + +[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/amiremohamadi/tunl) + +### Manually 1. [Create an API token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/) from the cloudflare dashboard. 2. Create a `.env` file based on `.env.example` and fill the values based on your tokens