File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,12 @@ jobs:
7474 elif [ -d _build/dist ]; then
7575 cp -r _build/dist frontend/docker/
7676 else
77- # artifact 可能把内容解压到根目录
7877 mkdir -p frontend/docker/dist
79- cp -r index.html assets frontend/docker/dist/ 2>/dev/null || (echo "Artifact structure:" && find . -maxdepth 3 -type d && exit 1)
78+ for f in index.html assets captcha ppt; do [ -e "$f" ] && cp -r "$f" frontend/docker/dist/; done
79+ cp -r *.ttf *.png *.jpg *.svg *.txt *.js *.wasm frontend/docker/dist/ 2>/dev/null || true
80+ [ -f frontend/docker/dist/index.html ] || (echo "Artifact structure:" && find . -maxdepth 3 -type d && exit 1)
8081 fi
82+ ls -la frontend/docker/dist/ | head -25
8183
8284 - name : Set up Docker Buildx
8385 uses : docker/setup-buildx-action@v3
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ export const preloadFonts = async (): Promise<boolean> => {
2424
2525 const fontPromises = fontVariants . map ( ( variant : FontVariant ) => {
2626 return new Promise < void > ( ( resolve , reject ) => {
27- const font = new FontFace ( 'Google Sans Code' , `url(/${ variant . file } )` , {
27+ const base = ( import . meta as { env ?: { BASE_URL ?: string } } ) . env ?. BASE_URL ?? '/'
28+ const font = new FontFace ( 'Google Sans Code' , `url(${ base } ${ variant . file } )` , {
2829 weight : variant . weight ,
2930 style : variant . style
3031 } ) ;
You can’t perform that action at this time.
0 commit comments