FMHYedit/.github/workflows/deploy-api.yml

38 lines
818 B
YAML
Raw Normal View History

2023-11-12 16:42:57 +00:00
name: Deploy API
on:
workflow_dispatch:
2023-11-12 16:42:57 +00:00
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
ci:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 6
- uses: pnpm/action-setup@v2.4.0
- uses: actions/setup-node@v3
with:
node-version: 18
2024-01-25 16:32:45 +00:00
cache: 'pnpm'
2023-11-12 16:42:57 +00:00
- run: pnpm install --no-frozen-lockfile
- name: Build
run: pnpm api:build
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
NITRO_PRESET: cloudflare
- name: Publish to Cloudflare
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
vars: WEBHOOK_URL
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}