FMHYedit/.github/workflows/deploy-api.yml
taskylizard 2a5f85c7ba
feat(github/workflows/deploy-api.yml): Use actions/setup-node@v3 with node-version 20
Change node version to 20
Update cache to 'pnpm'
Remove frozen lockfile option
2024-07-09 10:23:50 +00:00

38 lines
815 B
YAML

name: Deploy API
on:
workflow_dispatch:
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: 20
cache: 'pnpm'
- run: pnpm install --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 }}