Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Wxh16144 committed Mar 5, 2023
1 parent 606927b commit dbf5367
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
11 changes: 5 additions & 6 deletions .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ import { defineConfig } from 'dumi';

const name = 'cssinjs';

const isDeployGitHubPage = [
process.env.GH_PAGE,
process.env.GITHUB_ACTIONS,
].includes('true');
const isProdSite =
// 不是预览模式 同时是生产环境
process.env.PREVIEW !== 'true' && process.env.NODE_ENV === 'production';

export default defineConfig({
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
Expand All @@ -16,6 +15,6 @@ export default defineConfig({
},
outputPath: '.doc',
exportStatic: {},
base: isDeployGitHubPage ? `/${name}/` : '/',
publicPath: isDeployGitHubPage ? `/${name}/` : '/',
base: isProdSite ? `/${name}/` : '/',
publicPath: isProdSite ? `/${name}/` : '/',
});
2 changes: 1 addition & 1 deletion .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
dist: .doc
build: |
npm install
npm run docs:build
npm run docs:preview
- name: Get the preview_url
run: echo "url => ${{ steps.preview_step.outputs.preview_url }}"
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
"start": "dumi dev",
"docs:build": "dumi build",
"docs:deploy": "gh-pages -d .doc",
"docs:preview": "PREVIEW=true npm run docs:build",
"compile": "father build",
"gh-pages": "GH_PAGE=true npm run docs:build",
"gh-pages": "npm run docs:build",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"postpublish": "npm run gh-pages",
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md",
Expand Down

0 comments on commit dbf5367

Please sign in to comment.