Skip to content

Commit

Permalink
fix(ci): github pages base url
Browse files Browse the repository at this point in the history
  • Loading branch information
Hagith committed Aug 19, 2024
1 parent c73bbba commit 938ac7e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/gh-pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- id: repository-basename
run: |
echo "value=`basename ${{ github.repository }}`" >> $GITHUB_OUTPUT
shell: bash

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
Expand All @@ -31,6 +36,8 @@ jobs:

- name: Build
run: pnpm build
env:
BASE_URL: ${{ steps.repository-basename.outputs.value }}

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
6 changes: 6 additions & 0 deletions packages/website/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineConfig } from 'vite';

const { BASE_URL } = process.env;
export default defineConfig({
base: BASE_URL || '/',
});

0 comments on commit 938ac7e

Please sign in to comment.