2024-05-11 02:24:22 +08:00
|
|
|
name: 🚀 Deploy API
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Deploy
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup pnpm 8
|
|
|
|
uses: pnpm/action-setup@v2
|
|
|
|
with:
|
|
|
|
version: 8
|
|
|
|
|
|
|
|
- name: Install global dependencies
|
|
|
|
run: pnpm install
|
|
|
|
|
|
|
|
- name: Deploy to Cloudflare Workers
|
|
|
|
uses: cloudflare/wrangler-action@v3
|
|
|
|
with:
|
|
|
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
2024-05-11 02:47:32 +08:00
|
|
|
packageManager: pnpm
|
2024-05-11 23:38:05 +08:00
|
|
|
workingDirectory: 'api-routes'
|
2024-08-21 02:15:05 +08:00
|
|
|
secrets: |
|
|
|
|
UPSTASH_REDIS_URL
|
|
|
|
UPSTASH_REDIS_TOKEN
|
|
|
|
env:
|
|
|
|
UPSTASH_REDIS_URL: ${{ secrets.UPSTASH_REDIS_URL }}
|
|
|
|
UPSTASH_REDIS_TOKEN: ${{ secrets.UPSTASH_REDIS_TOKEN }}
|