Skip to content

Commit

Permalink
🔧 ci: fix preview build
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Feb 1, 2023
1 parent 5d21deb commit 65903b2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .dumirc.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import { defineConfig } from 'dumi';

// 不是预览模式 同时是生产环境
const isProdSite = process.env.PREVIEW !== '1';

export default defineConfig({
themeConfig: {
name: 'Ant Design Style',
logo: 'https://gw.alipayobjects.com/zos/hitu-asset/c88e3678-6900-4289-8538-31367c2d30f2/hitu-1609235995955-image.png',
repoUrl: 'https://github.com/arvinxx/antd-style',
repoUrl: 'https://github.com/ant-design/antd-style',
},
favicons: [
'https://gw.alipayobjects.com/zos/hitu-asset/c88e3678-6900-4289-8538-31367c2d30f2/hitu-1609235995955-image.png',
],
// 部署在非根目录时, base 和 publicPath 都需要配置
base: isProdSite ? '/antd-style/' : '/',
publicPath: isProdSite ? '/antd-style/' : '/',
extraBabelPlugins: ['@emotion'],
styles: [
`html, body { background: transparent; }
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"token-system",
"antd"
],
"homepage": "https://github.com/arvinxx/antd-style",
"homepage": "https://github.com/ant-design/antd-style",
"bugs": {
"url": "https://github.com/arvinxx/antd-style"
"url": "https://github.com/ant-design/antd-style"
},
"repository": {
"type": "git",
"url": "https://github.com/arvinxx/antd-style.git"
"url": "https://github.com/ant-design/antd-style.git"
},
"license": "MIT",
"author": "arvinxx([email protected])",
Expand All @@ -38,6 +38,7 @@
"docs:analyze": "ANALYZE=1 dumi build",
"docs:build": "dumi build",
"docs:deploy": "gh-pages -d dist",
"docs:preview": "PREVIEW=1 dumi build",
"doctor": "father doctor",
"gh-pages": "npm run docs:build && npm run docs:deploy",
"lint": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
Expand Down

0 comments on commit 65903b2

Please sign in to comment.