File tree Expand file tree Collapse file tree 11 files changed +6852
-1276
lines changed Expand file tree Collapse file tree 11 files changed +6852
-1276
lines changed Original file line number Diff line number Diff line change
1
+ name : " Check"
2
+ description : " Run Checks"
3
+ runs :
4
+ using : " composite"
5
+ steps :
6
+ - name : Setup
7
+ uses : ./.github/actions/setup
8
+ - name : Run Checks
9
+ shell : bash
10
+ run : npm run check
Original file line number Diff line number Diff line change
1
+ name : " Deploy"
2
+ description : " Deploy Apps"
3
+ inputs :
4
+ cloudflare_api_token :
5
+ description : " the couldflare api token"
6
+ required : true
7
+ runs :
8
+ using : " composite"
9
+ steps :
10
+ - name : Setup
11
+ uses : ./.github/actions/setup
12
+ - name : Run Build
13
+ shell : bash
14
+ run : npm run build
15
+ - name : Deploy To Cloudflare
16
+ uses : cloudflare/wrangler-action@v3
17
+ with :
18
+ apiToken : ${{ inputs.cloudflare_api_token }}
19
+ workingDirectory : " apps/web"
20
+ command : wrangler pages deploy
Original file line number Diff line number Diff line change
1
+ name : " Setup"
2
+ description : " Setup the dependencies"
3
+ runs :
4
+ using : " composite"
5
+ steps :
6
+ - name : Cache Turbo Build Setup
7
+ uses : actions/cache@v4
8
+ with :
9
+ path : .turbo
10
+ key : ${{ runner.os }}-release-job-${{ github.sha }}
11
+ restore-keys : |
12
+ ${{ runner.os }}-release-job-
13
+ - name : Setup Node.js Environment
14
+ uses : actions/setup-node@v4
15
+ with :
16
+ node-version : 20
17
+ cache : " npm"
18
+ - name : Install Dependencies
19
+ shell : bash
20
+ run : npm install
Original file line number Diff line number Diff line change
1
+ name : " Test"
2
+ description : " Run Tests"
3
+ runs :
4
+ using : " composite"
5
+ steps :
6
+ - name : Setup
7
+ uses : ./.github/actions/setup
8
+ - name : Run Tests
9
+ shell : bash
10
+ run : npm run test
Original file line number Diff line number Diff line change
1
+ name : CI/CD Pipeline
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches :
7
+ - main
8
+ - dev
9
+
10
+ permissions :
11
+ id-token : write
12
+ contents : read
13
+ deployments : write
14
+
15
+ jobs :
16
+ check :
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - name : Check Out Code
20
+ uses : actions/checkout@v4
21
+ with :
22
+ fetch-depth : 2
23
+ - name : Run Checks
24
+ uses : ./.github/actions/check
25
+
26
+ test :
27
+ runs-on : ubuntu-latest
28
+ steps :
29
+ - name : Check Out Code
30
+ uses : actions/checkout@v4
31
+ with :
32
+ fetch-depth : 2
33
+ - name : Run Tests
34
+ uses : ./.github/actions/test
35
+
36
+ deploy :
37
+ runs-on : ubuntu-latest
38
+ needs :
39
+ - check
40
+ - test
41
+ steps :
42
+ - name : Check Out Code
43
+ uses : actions/checkout@v4
44
+ with :
45
+ fetch-depth : 2
46
+ - name : Deploy App
47
+ uses : ./.github/actions/deploy
48
+ with :
49
+ cloudflare_api_token : ${{ secrets.CLOUDFLARE_API_TOKEN }}
Original file line number Diff line number Diff line change @@ -58,7 +58,14 @@ To add a npm package `pkg` use the following command:
58
58
59
59
``` shell
60
60
cd jeton
61
- npm install pkg --workspace=< YOUR PROJECT/WORKSPACE>
61
+ npm install --workspace=< YOUR PROJECT/WORKSPACE> [--save| --save-dev] pkg
62
+ ```
63
+
64
+ For example:
65
+
66
+ ``` shell
67
+ cd jeton
68
+ npm install --workspace=apps/web --save-dev @cloudflare/next-on-pages
62
69
```
63
70
64
71
### Lint Project
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import { Button } from "@jeton/ui/button";
2
2
import Image from "next/image" ;
3
3
import styles from "./page.module.css" ;
4
4
5
+ export const runtime = "edge" ;
6
+
5
7
export default function Home ( ) {
6
8
return (
7
9
< div className = { styles . page } >
Original file line number Diff line number Diff line change
1
+ import { setupDevPlatform } from "@cloudflare/next-on-pages/next-dev" ;
2
+
1
3
/** @type {import('next').NextConfig } */
2
4
const nextConfig = { } ;
3
5
6
+ if ( process . env . NODE_ENV === "development" ) {
7
+ await setupDevPlatform ( ) ;
8
+ }
9
+
4
10
export default nextConfig ;
Original file line number Diff line number Diff line change 5
5
"scripts" : {
6
6
"dev" : " next dev --turbo" ,
7
7
"build" : " next build" ,
8
- "start" : " next start"
8
+ "start" : " next start" ,
9
+ "next-on-pages:build" : " npx @cloudflare/next-on-pages"
9
10
},
10
11
"dependencies" : {
11
12
"@jeton/ui" : " *" ,
13
+ "next" : " 15.0.0-rc.0" ,
12
14
"react" : " 19.0.0-rc-f994737d14-20240522" ,
13
- "react-dom" : " 19.0.0-rc-f994737d14-20240522" ,
14
- "next" : " 15.0.0-rc.0"
15
+ "react-dom" : " 19.0.0-rc-f994737d14-20240522"
15
16
},
16
17
"devDependencies" : {
18
+ "@cloudflare/next-on-pages" : " ^1.13.2" ,
17
19
"@jeton/typescript-config" : " *" ,
18
- "typescript" : " ^5" ,
19
20
"@types/node" : " ^20" ,
20
21
"@types/react" : " ^18" ,
21
- "@types/react-dom" : " ^18"
22
+ "@types/react-dom" : " ^18" ,
23
+ "typescript" : " ^5"
22
24
}
23
25
}
Original file line number Diff line number Diff line change
1
+ {
2
+ "$schema" : " https://turbo.build/schema.json" ,
3
+ "extends" : [" //" ],
4
+ "tasks" : {
5
+ "build" : {
6
+ "dependsOn" : [" next-on-pages:build" ],
7
+ "outputs" : [" .vercel/**" ]
8
+ },
9
+ "next-on-pages:build" : {}
10
+ }
11
+ }
You can’t perform that action at this time.
0 commit comments