Skip to content

Commit

Permalink
chore: move basePath configuration to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DerStimmler committed Aug 27, 2023
1 parent 4d146a2 commit 1833aab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ jobs:
run: pnpm install

- name: Build
run: pnpm build
env:
BASE_PATH: '/stromgedacht-web'
run: |
pnpm build
touch build/.nojekyll
- name: Check
run: pnpm check
Expand Down Expand Up @@ -58,7 +62,7 @@ jobs:
retention-days: 30

deploy-demo:
name: Deploy app
name: Deploy
runs-on: ubuntu-latest
needs: build
permissions:
Expand All @@ -68,6 +72,6 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy demo to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
4 changes: 2 additions & 2 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/kit/vite';

const isProduction = process.env.NODE_ENV === 'production';
const isDevelopment = process.env.NODE_ENV === 'development';

/** @type {import('@sveltejs/kit').Config} */
const config = {
Expand All @@ -20,7 +20,7 @@ const config = {
strict: true
}),
paths: {
base: isProduction ? '/stromgedacht-web' : '',
base: isDevelopment ? '' : process.env.BASE_PATH,
relative: false
}
}
Expand Down

0 comments on commit 1833aab

Please sign in to comment.