Files
EdgeSSH/.github/workflows/deploy.yml
T

45 lines
884 B
YAML

name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: production-deploy
cancel-in-progress: false
permissions:
contents: read
jobs:
deploy:
name: Deploy to Cloudflare
runs-on: ubuntu-latest
timeout-minutes: 15
env:
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22.12.0
cache: npm
- name: Install dependencies
run: npm ci
- name: Check project
run: npm run check
- name: Apply D1 migrations
run: npx wrangler d1 migrations apply DB --remote
- name: Deploy Worker
run: npm run deploy