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

46 lines
989 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
strategy:
matrix:
node-version: [20]
2023-11-12 16:42:57 +00:00
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 6
- name: Install pnpm
uses: pnpm/action-setup@v4
2024-07-09 10:30:20 +00:00
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
2023-11-12 16:42:57 +00:00
with:
node-version: ${{ matrix.node-version }}
2024-01-25 16:32:45 +00:00
cache: 'pnpm'
2023-11-12 16:42:57 +00:00
- name: Install dependencies
run: pnpm install
2023-11-12 16:42:57 +00:00
- 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 }}