File tree Expand file tree Collapse file tree
.github/workflows_disabled Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy Bot (Dev)
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ - main
8+ workflow_dispatch :
9+
10+ jobs :
11+ deploy :
12+ runs-on : ubuntu-latest
13+ environment : dev
14+ steps :
15+ - uses : actions/checkout@v4
16+ with :
17+ submodules : recursive
18+ - uses : actions/setup-node@v4
19+ with :
20+ node-version : latest
21+ - name : Install dependencies
22+ run : npm install
23+ - name : Check secrets
24+ run : |
25+ if [ -z "${{ secrets.SECRET_TELEGRAM_API_TOKEN }}" ]; then
26+ echo "Error: SECRET_TELEGRAM_API_TOKEN is empty. Please set it in GitHub Secrets."
27+ exit 1
28+ fi
29+ - name : Deploy to Cloudflare Workers
30+ uses : cloudflare/wrangler-action@v3
31+ with :
32+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
33+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
34+ workingDirectory : bot
35+ environment : dev
36+ secrets : |
37+ SECRET_TELEGRAM_API_TOKEN
38+ TAVILY_API_KEY
39+ env :
40+ SECRET_TELEGRAM_API_TOKEN : ${{ secrets.SECRET_TELEGRAM_API_TOKEN }}
41+ TAVILY_API_KEY : ${{ secrets.TAVILY_API_KEY }}
Original file line number Diff line number Diff line change 1+ name : Deploy Bot (Prod)
2+
3+ on :
4+ push :
5+ tags :
6+ - ' bot-v*'
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+ environment : prod
12+ steps :
13+ - uses : actions/checkout@v4
14+ with :
15+ submodules : recursive
16+ - uses : actions/setup-node@v4
17+ with :
18+ node-version : latest
19+ - name : Install dependencies
20+ run : npm install
21+ - name : Check secrets
22+ run : |
23+ if [ -z "${{ secrets.SECRET_TELEGRAM_API_TOKEN }}" ]; then
24+ echo "Error: SECRET_TELEGRAM_API_TOKEN is empty. Please set it in GitHub Secrets."
25+ exit 1
26+ fi
27+ - name : Deploy to Cloudflare Workers
28+ uses : cloudflare/wrangler-action@v3
29+ with :
30+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
31+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
32+ workingDirectory : bot
33+ environment : production
34+ secrets : |
35+ SECRET_TELEGRAM_API_TOKEN
36+ TAVILY_API_KEY
37+ env :
38+ SECRET_TELEGRAM_API_TOKEN : ${{ secrets.SECRET_TELEGRAM_API_TOKEN }}
39+ TAVILY_API_KEY : ${{ secrets.TAVILY_API_KEY }}
Original file line number Diff line number Diff line change 1+ name : Deploy WebApp (Dev)
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ - main
8+ workflow_dispatch :
9+
10+ jobs :
11+ deploy :
12+ runs-on : ubuntu-latest
13+ environment : dev
14+ steps :
15+ - uses : actions/checkout@v4
16+ with :
17+ submodules : recursive
18+ - uses : actions/setup-node@v4
19+ with :
20+ node-version : latest
21+ - name : Install dependencies
22+ run : npm install
23+ - name : Build
24+ run : npm run build
25+ working-directory : webapp
26+ - name : Deploy
27+ run : npx wrangler pages deploy .svelte-kit/cloudflare --project-name tux-robot-webapp --branch preview
28+ working-directory : webapp
29+ env :
30+ CLOUDFLARE_API_TOKEN : ${{ secrets.CLOUDFLARE_API_TOKEN }}
31+ CLOUDFLARE_ACCOUNT_ID : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Original file line number Diff line number Diff line change 1+ name : Deploy WebApp (Prod)
2+
3+ on :
4+ push :
5+ tags :
6+ - ' webapp-v*'
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+ environment : prod
12+ steps :
13+ - uses : actions/checkout@v4
14+ with :
15+ submodules : recursive
16+ - uses : actions/setup-node@v4
17+ with :
18+ node-version : latest
19+ - name : Install dependencies
20+ run : npm install
21+ - name : Build
22+ run : npm run build
23+ working-directory : webapp
24+ - name : Deploy
25+ run : npx wrangler pages deploy .svelte-kit/cloudflare --project-name tux-robot-webapp --branch main
26+ working-directory : webapp
27+ env :
28+ CLOUDFLARE_API_TOKEN : ${{ secrets.CLOUDFLARE_API_TOKEN }}
29+ CLOUDFLARE_ACCOUNT_ID : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Original file line number Diff line number Diff line change 11[submodule "webapp "]
22 path = webapp
3- url = https ://github.com /codebam/tux-robot -webapp.git
3+ url = ssh ://git@codeberg.org /codebam/telegram -webapp.git
44[submodule "bot "]
55 path = bot
6- url = https ://github.com /codebam/tux-robot .git
6+ url = ssh ://git@codeberg.org /codebam/telegram-bot .git
Original file line number Diff line number Diff line change 1+ pipeline :
2+ # Deploy Bot to Production
3+ deploy_bot_prod :
4+ image : cloudflare/wrangler-action:v3
5+ settings :
6+ apiToken :
7+ from_secret : CLOUDFLARE_API_TOKEN
8+ accountId :
9+ from_secret : CLOUDFLARE_ACCOUNT_ID
10+ workingDirectory : bot
11+ environment : production
12+ secrets : |
13+ SECRET_TELEGRAM_API_TOKEN
14+ TAVILY_API_KEY
15+ environment :
16+ SECRET_TELEGRAM_API_TOKEN :
17+ from_secret : SECRET_TELEGRAM_API_TOKEN
18+ TAVILY_API_KEY :
19+ from_secret : TAVILY_API_KEY
20+ when :
21+ event : tag
22+ target : bot-v*
23+
24+ # Deploy Webapp to Production
25+ deploy_webapp_prod :
26+ image : cloudflare/wrangler-action:v3
27+ settings :
28+ apiToken :
29+ from_secret : CLOUDFLARE_API_TOKEN
30+ accountId :
31+ from_secret : CLOUDFLARE_ACCOUNT_ID
32+ workingDirectory : webapp
33+ command : pages deploy .svelte-kit/cloudflare --project-name telegram-webapp
34+ when :
35+ event : tag
36+ target : v*
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ CF Workers Telegram Bot
55<br />
66</h3 >
77
8+ > 🚀 ** This project has moved to [ Codeberg] ( https://codeberg.org/codebam/cf-workers-telegram-bot ) **
9+
810<p align =" center " >
911<a href =" https://github.com/codebam/cf-workers-telegram-bot/stargazers " > <img src =" https://img.shields.io/github/stars/codebam/cf-workers-telegram-bot?style=for-the-badge&logo=starship&color=111111&logoColor=ffffff&labelColor=000000 " alt =" GitHub stars " /></a >
1012<a href =" https://github.com/codebam/cf-workers-telegram-bot/issues " >
You can’t perform that action at this time.
0 commit comments