-
-
Notifications
You must be signed in to change notification settings - Fork 113
86 lines (72 loc) · 3.26 KB
/
build.yml
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
# Name of our action
name: Build
# The event that will trigger the action
on:
pull_request:
branches: [main]
# what the action will do
jobs:
build:
# The operating system it will run on
runs-on: ubuntu-latest
# This check needs to be in place to prevent a publish loop with auto and github actions
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
# The list of steps that the action will go through
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare repository
run: git fetch --unshallow --tags
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Create .env.local file
run: |
touch apps/app/.env.local
echo "CLERK_SECRET_KEY=sk_test_JA==" >> apps/app/.env.local
echo "CLERK_WEBHOOK_SECRET=whsec_test" >> apps/app/.env.local
echo "RESEND_AUDIENCE_ID=test" >> apps/app/.env.local
echo "RESEND_FROM=test@test.com" >> apps/app/.env.local
echo "DATABASE_URL=postgresql://test:test@localhost:5432/test" >> apps/app/.env.local
echo "RESEND_TOKEN=re_test" >> apps/app/.env.local
echo "STRIPE_SECRET_KEY=sk_test" >> apps/app/.env.local
echo "STRIPE_WEBHOOK_SECRET=whsec_test" >> apps/app/.env.local
echo "BETTERSTACK_API_KEY=test" >> apps/app/.env.local
echo "BETTERSTACK_URL=https://test.com" >> apps/app/.env.local
echo "NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_JA==" >> apps/app/.env.local
echo "NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in" >> apps/app/.env.local
echo "NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up" >> apps/app/.env.local
echo "NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/" >> apps/app/.env.local
echo "NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/" >> apps/app/.env.local
echo "NEXT_PUBLIC_GA_MEASUREMENT_ID=G-test" >> apps/app/.env.local
echo "NEXT_PUBLIC_POSTHOG_KEY=phc_test" >> apps/app/.env.local
echo "NEXT_PUBLIC_POSTHOG_HOST=https://test.com" >> apps/app/.env.local
echo "NEXT_PUBLIC_APP_URL=http://localhost:3000" >> apps/app/.env.local
echo "NEXT_PUBLIC_WEB_URL=http://localhost:3001" >> apps/app/.env.local
echo "NEXT_PUBLIC_DOCS_URL=http://localhost:3004" >> apps/app/.env.local
echo "NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL=http://localhost:3002" >> apps/app/.env.local
- name: Copy .env.local file
run: |
cp apps/app/.env.local apps/web/.env.local
cp apps/app/.env.local apps/api/.env.local
- name: Build
run: pnpm build