From 421e775eb98b9cffdabbe76de0c95c60c1f12d29 Mon Sep 17 00:00:00 2001 From: Kryscau <73716731+kryscau@users.noreply.github.com> Date: Mon, 9 Jun 2025 03:50:55 +0200 Subject: [PATCH] Update build --- .github/workflows/deploy.yml | 17 ++++++++--------- svelte.config.js | 2 -- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c0d1e7d..bd0f7c3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,12 +13,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - # If you're using pnpm, add this step then change the commands and cache key below to use `pnpm` - # - name: Install pnpm - # uses: pnpm/action-setup@v3 - # with: - # version: 8 - - name: Install Node.js uses: actions/setup-node@v4 with: @@ -28,14 +22,19 @@ jobs: - name: Install dependencies run: npm install - - name: build + - name: Build SvelteKit env: PUBLIC_GITHUB_API_URL: 'https://api.github.com' PUBLIC_GITHUB_USERNAME: ${{ github.repository_owner }} + # ➕ ajoute ici le BASE_PATH si besoin (ex : '/mon-repo') + BASE_PATH: '' run: | + echo "PUBLIC_GITHUB_API_URL=https://api.github.com" >> .env + echo "PUBLIC_GITHUB_USERNAME=${{ github.repository_owner }}" >> .env + echo "BASE_PATH=${BASE_PATH}" >> .env npm run build - - name: Upload Artifacts + - name: Upload build folder uses: actions/upload-pages-artifact@v3 with: path: 'build/' @@ -53,6 +52,6 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - - name: Deploy + - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 diff --git a/svelte.config.js b/svelte.config.js index 393318c..caf637f 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -5,8 +5,6 @@ const config = { adapter: adapter({ // default options are shown. On some platforms // these options are set automatically — see below - pages: 'build', - assets: 'build/assets', fallback: '404.html', precompress: true, strict: true