diff --git a/.github/workflows/build_frontend.yml b/.github/workflows/build_frontend.yml index a13bc287..90bb8db8 100644 --- a/.github/workflows/build_frontend.yml +++ b/.github/workflows/build_frontend.yml @@ -24,12 +24,9 @@ concurrency: jobs: # Single deploy job since we're just deploying deploy: - defaults: - run: - working-directory: ./frontend environment: name: github-pages - url: ${{ steps.deployment.outputs.page_url }}frontend/ + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - name: Checkout @@ -38,12 +35,21 @@ jobs: - name: Install Bun uses: oven-sh/setup-bun@v1 - - name: Install + - name: CD frontend + run: cd frontend + + - name: Install Docs run: bun install - name: Build run: bun run build + - name: Create base dist folder + run: mkdir -p ../dist + + - name: Copy frontend dist to base dist + run: cp -r .frontend/dist ./dist + - name: Setup Pages uses: actions/configure-pages@v5 diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 9cbacf8e..4e7ed675 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -4,5 +4,5 @@ import react from '@vitejs/plugin-react-swc' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], - base: "/teamagochi/frontend/" + base: "/teamagochi/" })