-
Notifications
You must be signed in to change notification settings - Fork 280
67 lines (55 loc) · 2.05 KB
/
preview.retheme.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
name: Deploy Retheme Preview
run-name: Deploy Retheme Preview
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_CLERK_PROD_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_JS_RETHEME_PROJECT_ID }}
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.actor }}
cancel-in-progress: true
jobs:
preview:
runs-on: ${{ vars.RUNNER_NORMAL || 'ubuntu-latest' }}
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL && fromJSON(vars.TIMEOUT_MINUTES_NORMAL) || 10 }}
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup
id: config
uses: ./.github/actions/init
with:
turbo-signature: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
turbo-team: ${{ vars.TURBO_TEAM }}
turbo-token: ${{ secrets.TURBO_TOKEN }}
registry-url: 'https://registry.npmjs.org'
- name: Build packages
run: pnpm turbo build $TURBO_ARGS
- name: Install site in isolation
run: node scripts/install-site-in-isolation.mjs playground/nextjs
- name: Install Vercel CLI
run: pnpm add -g vercel@latest
- name: Pull Vercel environment information
run: |
cd $FULL_TMP_FOLDER
vercel pull --yes --environment=production --token=${{ secrets.VERCEL_CLERK_COOKIE_TOKEN }}
- name: Copy clerk-js/dist into public/clerk-js of test site
run: |
cp -r $GITHUB_WORKSPACE/packages/clerk-js/dist $FULL_TMP_FOLDER/public/clerk-js
- name: Build with Vercel
run: |
cd $FULL_TMP_FOLDER
vercel build --yes --prod
env:
NEXT_PUBLIC_CLERK_JS_URL: /clerk-js/clerk.browser.js
- name: Deploy to Vercel (prebuilt)
id: vercel-deploy
run: |
cd $FULL_TMP_FOLDER
vercel deploy --prebuilt --token=${{ secrets.VERCEL_CLERK_COOKIE_TOKEN }} --no-wait --prod > deployment_url.txt
echo "url=$(cat deployment_url.txt)" >> $GITHUB_OUTPUT