Skip to content

feat: refresh the model lineup and correct two capability flags #868

feat: refresh the model lineup and correct two capability flags

feat: refresh the model lineup and correct two capability flags #868

Workflow file for this run

name: deploy
on:
push:
branches: [master, main]
tags:
- 'bot-v*'
- 'webapp-v*'
pull_request:
branches: [master, main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
WRANGLER_SEND_METRICS: 'false'
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- name: Typecheck shared
run: bun run --cwd packages/shared check
- name: Typecheck bot
run: bun run --cwd bot check
deploy_bot_dev:
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')
needs: check
runs-on: ubuntu-latest
environment: dev
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm install
- name: Deploy bot (dev)
working-directory: bot
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
SECRET_TELEGRAM_API_TOKEN: ${{ secrets.SECRET_TELEGRAM_API_TOKEN_DEV }}
TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }}
run: |
npx wrangler deploy \
--containers-rollout=none \
--env dev \
--var SECRET_TELEGRAM_API_TOKEN:"$SECRET_TELEGRAM_API_TOKEN" \
--var TAVILY_API_KEY:"$TAVILY_API_KEY" \
--var COMMIT_SHA:"$GITHUB_SHA"
deploy_bot_prod:
if: startsWith(github.ref, 'refs/tags/bot-v')
needs: check
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm install
- name: Deploy bot (production)
working-directory: bot
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
SECRET_TELEGRAM_API_TOKEN: ${{ secrets.SECRET_TELEGRAM_API_TOKEN }}
TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }}
run: |
npx wrangler deploy \
--containers-rollout=none \
--env production \
--var SECRET_TELEGRAM_API_TOKEN:"$SECRET_TELEGRAM_API_TOKEN" \
--var TAVILY_API_KEY:"$TAVILY_API_KEY" \
--var COMMIT_SHA:"$GITHUB_SHA"
deploy_webapp_prod:
if: startsWith(github.ref, 'refs/tags/webapp-v')
needs: check
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm install
- name: Build webapp
working-directory: webapp
run: npm run build
- name: Deploy webapp
working-directory: webapp
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: npx wrangler pages deploy .svelte-kit/cloudflare --project-name telegram-webapp --branch main