Skip to content

chore: bump version to 0.3.0 for frontend and workers #11

chore: bump version to 0.3.0 for frontend and workers

chore: bump version to 0.3.0 for frontend and workers #11

name: Deploy cloudflare-workers to Workers
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
changes:
runs-on: ubuntu-latest
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
- uses: actions/checkout@v4
name: Checkout Repo
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
src:
- 'cloudflare-workers/**'
deploy:
name: Deploy
needs: changes
if: ${{ needs.changes.outputs.src == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./cloudflare-workers
steps:
- uses: actions/checkout@v4
name: Checkout Repo
- uses: actions/setup-node@v4
name: Set Node.js 20.x
with:
node-version: 20.x
- uses: borales/actions-yarn@v5
name: Run install
with:
cmd: install
dir: cloudflare-workers
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
workingDirectory: "cloudflare-workers"
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
secrets: |
ADMINISTRATOR_SECRET
TELEGRAM_BOT_TOKEN
TELEGRAM_CHAT_ID
GITHUB_APP_CLIENT_ID
GITHUB_APP_CLIENT_SECRET
OAUTH_JWT_SECRET
preCommands: |
wrangler d1 execute comments --yes --file=schema.sql
env:
ADMINISTRATOR_SECRET: ${{ secrets.ADMINISTRATOR_SECRET }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
GITHUB_APP_CLIENT_ID: ${{ secrets.GH_APP_CLIENT_ID }}
GITHUB_APP_CLIENT_SECRET: ${{ secrets.GH_APP_CLIENT_SECRET }}
OAUTH_JWT_SECRET: ${{ secrets.OAUTH_JWT_SECRET }}
upload-artifacts:
name: Upload Artifacts
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./cloudflare-workers
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
name: Checkout Repo
- uses: actions/upload-artifact@v2
with:
name: cloudflare-workers
path: cloudflare-workers