From 9bc3fab15c90edfb29e49bee0ebd8e4888be9840 Mon Sep 17 00:00:00 2001 From: annsann Date: Mon, 6 May 2024 17:23:09 +0200 Subject: [PATCH] Try to make frontend the base project --- .github/workflows/build_frontend.yml | 16 +++++++++++----- frontend/vite.config.ts | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) 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/" })