-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (107 loc) · 3.14 KB
/
members-hosting-merge.yml
File metadata and controls
113 lines (107 loc) · 3.14 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Deploy Members site to Firebase Hosting on merge
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- trunk
paths:
- "members/**"
- ".github/workflows/members-hosting-merge.yml"
jobs:
lint:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}:trunk
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
working-directory: members
run: bun install
- name: Lint Members site
working-directory: members
run: bun run lint
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}:trunk
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
working-directory: members
run: bun install
- name: Test Members site
working-directory: members
run: bun run test
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}:trunk
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
working-directory: members
run: bun install
- name: Build Members site
working-directory: members
run: bun run build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: members-build
path: members/dist/members/browser
retention-days: 1
e2e:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}:trunk
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install root dependencies
run: bun install
- name: Install functions dependencies
working-directory: functions
run: npm install
- name: Install members dependencies
working-directory: members
run: bun install
- name: Lint E2E tests
working-directory: members
run: bun run lint:e2e
- name: Typecheck E2E tests
working-directory: members
run: bun run typecheck:e2e
- name: Run E2E tests
working-directory: members
run: bun run e2e
- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: members/playwright-report/
retention-days: 7
deploy:
needs: [lint, test, build, e2e]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: members-build
path: members/dist/members/browser
- name: Deploy to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_DOULA_COOPERATIVE }}
channelId: live
projectId: doula-cooperative
target: members-site