Repository navigation
72 lines (61 loc) · 1.78 KB
/
Copy pathbackend-staging-deploy.yml
File metadata and controls
72 lines (61 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Backend staging deployment
on:
push:
branches:
- dev
paths:
- .github/workflows/backend-staging-deploy.yml
- apps/backend/**
- infra/azure/staging/deploy-convex.sh
- package.json
- packages/domain/**
- pnpm-lock.yaml
- pnpm-workspace.yaml
workflow_dispatch:
permissions:
contents: read
concurrency:
group: backend-staging-deployment
cancel-in-progress: false
jobs:
verify:
name: Verify backend
if: github.ref == 'refs/heads/dev'
runs-on: ubuntu-24.04
timeout-minutes: 25
steps:
- uses: actions/checkout@v6
- name: Install pnpm, Node.js, and dependencies
uses: pnpm/setup@c9883cc79df532ad1a7b81bf9ab944ceb090d65c
with:
runtime: node@24
cache: true
- name: Type-check backend
run: pnpm --filter @code2create/backend typecheck
- name: Test backend
run: pnpm --filter @code2create/backend test
deploy-staging:
name: Deploy staging backend
if: github.ref == 'refs/heads/dev'
needs: verify
runs-on: ubuntu-24.04
timeout-minutes: 10
environment: staging
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- name: Install pnpm, Node.js, and dependencies
uses: pnpm/setup@c9883cc79df532ad1a7b81bf9ab944ceb090d65c
with:
runtime: node@24
cache: true
- name: Sign in to Azure with GitHub OIDC
uses: azure/login@v2
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
- name: Deploy exact revision to self-hosted Convex
run: bash infra/azure/staging/deploy-convex.sh "${GITHUB_SHA}"