Refer to Deployment Process for specific deployment steps.
To create a Cloudflare API Token with Workers permissions, follow these steps:
- Log in to your Cloudflare account and navigate to the "My Profile" page.
- Select "API Tokens" from the left-hand menu.
- Click the "Create Token" button.
- Choose "Edit Cloudflare Workers" from the API token templates.
- Add the following Secrets to the Github repository's Settings -> Secrets
- CF_API_TOKEN: Your Cloudflare API TOKEN
- WRANGLER_TOML: The full content of the wrangler.toml file. Refer to wrangler-example.toml for an example.
- CF_WORKERS_DOMAIN (optional): Your Cloudflare Workers route (the value of your *.workers.dev in the Workers route, without https://)
- Enable Actions in the Github repository's Settings -> Actions
- For security reasons, the repository you forked will not automatically sync with my repository. Therefore, you need to manually sync with my repository.
- When you manually sync with my repository, your repository will automatically trigger the Action and deploy automatically.
- If you want to skip this step, you can add an Action to automatically sync with my repository.
- Create a file in your repository named:
.github/workflows/sync.yml
- Copy the following content to the file.
- The code below has not been tested and is for reference only.
name: Sync on: schedule: - cron: '0 0 * * *' jobs: sync: runs-on: ubuntu-latest steps: - name: Sync uses: repo-sync/github-sync@v2 with: source_repo: 'https://github.com/TBXark/ChatGPT-Telegram-Workers' target_repo: 'Fill in your repository address' github_token: ${{ secrets.GITHUB_TOKEN }} source_branch: 'master'
- Create a file in your repository named: