Skip to content

Commit

Permalink
fix: 修复github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
huangmingfu committed Oct 31, 2024
1 parent 6b5c2d1 commit 7c27b5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ jobs:
- name: Build blog project
run: |
echo ${{ github.workspace }}
pnpm run build:pro
pnpm run build:dev
# 资源拷贝
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./dist-pro
source: ./dist-dev
destination: ./_site

# 上传 _site 的资源,用于后续部署
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
// 获取`.env`环境配置文件
const env = loadEnv(mode, process.cwd());
return {
base: env.VITE_NODE_ENV === 'develop' ? '/react-ts-template/' : undefined, // 只为github pages 配置,自行删除
plugins: [react()],
resolve: {
alias: {
Expand Down

0 comments on commit 7c27b5b

Please sign in to comment.