File tree 6 files changed +10
-5
lines changed
6 files changed +10
-5
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
22
- name : Installing my packages
23
23
run : npm ci
24
24
25
+ - name : Extract repository name
26
+ run : echo "BASE_URL=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 2)" >> $GITHUB_ENV
27
+
25
28
- name : Build my App
26
29
run : npm run build && touch ./out/.nojekyll
27
30
Original file line number Diff line number Diff line change @@ -33,5 +33,3 @@ yarn-error.log*
33
33
34
34
# typescript
35
35
* .tsbuildinfo
36
-
37
- .env
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ const nextConfig = {
7
7
loader : "akamai" ,
8
8
path : "" ,
9
9
} ,
10
+ assetPrefix : "./" ,
10
11
} ;
11
12
12
13
export default nextConfig ;
Original file line number Diff line number Diff line change @@ -2,14 +2,15 @@ import type { NextPage } from "next";
2
2
import Head from "next/head" ;
3
3
import Image from "next/image" ;
4
4
import styles from "../styles/Home.module.css" ;
5
+ import { prefix } from "../utils/prefix" ;
5
6
6
7
const Home : NextPage = ( ) => {
7
8
return (
8
9
< div className = { styles . container } >
9
10
< Head >
10
11
< title > Create Next App</ title >
11
12
< meta name = "description" content = "Generated by create next app" />
12
- < link rel = "icon" href = " /favicon.ico" />
13
+ < link rel = "icon" href = { ` ${ prefix } /favicon.ico` } />
13
14
</ Head >
14
15
15
16
< main className = { styles . main } >
@@ -62,7 +63,7 @@ const Home: NextPage = () => {
62
63
Powered by{ " " }
63
64
< span className = { styles . logo } >
64
65
< Image
65
- src = { `${ process . env . BASE_PATH } /vercel.svg` }
66
+ src = { `${ prefix } /vercel.svg` }
66
67
alt = "Vercel Logo"
67
68
width = { 72 }
68
69
height = { 16 }
Original file line number Diff line number Diff line change
1
+ const prefix = process . env . BASE_PATH || "" ;
2
+
3
+ export { prefix } ;
You can’t perform that action at this time.
0 commit comments