-
-
Notifications
You must be signed in to change notification settings - Fork 85
56 lines (49 loc) · 1.48 KB
/
next.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
name: 'Next.js Deployment'
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'apps/next/**'
- 'packages/ui/**'
- 'packages/app/**'
jobs:
publish:
name: Publish to Cloudflare Pages
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
deployments: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: 'Bun setup'
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: 'Bun install'
run: bun install
- name: Build
run: |
cd apps/next
export TAMAGUI_TARGET=web
export NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }}
export NEXT_PUBLIC_APP_URL=${{ secrets.NEXT_PUBLIC_APP_URL }}
export NEXT_PUBLIC_SUPABASE_URL=${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
export NEXT_PUBLIC_SUPABASE_ANON_KEY=${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
bunx @cloudflare/next-on-pages
- name: Publish to Cloudflare Pages
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
projectName: ${{ secrets.CF_PROJECT_NAME }}
directory: .vercel/output/static
branch: main
wranglerVersion: '3'
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
workingDirectory: apps/next