Skip to content

Commit

Permalink
chore: fix cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
NWYLZW committed Aug 10, 2023
1 parent 2f71ef4 commit 966b2d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ jobs:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Download dist
uses: actions/download-artifact@v2
with:
Expand All @@ -103,6 +99,5 @@ jobs:
- name: Deploy to Vercel
env:
BASE: None
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
run: |
vercel --token=${{ secrets.VERCEL_TOKEN }} --prod --build-env BASE=None
vercel --token=${{ secrets.VERCEL_TOKEN }} --prod
3 changes: 2 additions & 1 deletion vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{ "src": "dist/**/*", "use": "@vercel/static" }
],
"rewrites": [
{ "source": "/(.*)", "destination": "/dist/$1" }
{ "source": "/(.*)", "destination": "/dist/$1" },
{ "source": "/app/(.*)", "destination": "/dist/$1" }
]
}
4 changes: 1 addition & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ configDotenv()

// https://vitejs.dev/config/
export default defineConfig(async env => ({
base: process.env.BASE === 'None'
? ''
: (process.env.BASE ?? `/${process.env.BASE_URL}/`),
base: `/${process.env.BASE_URL}/`,
plugins: [
react(),
env.mode === 'production' ? viteExternalsPlugin({
Expand Down

0 comments on commit 966b2d8

Please sign in to comment.