Skip to content

Commit

Permalink
fix: pathing for gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dually8 committed Mar 30, 2024
1 parent bbbfe08 commit 30b8d32
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ jobs:

- name: Build sveltekit project
shell: bash
env:
BASE_PATH: '/${{ github.event.repository.name }}'
run: npm ci && npm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './build'
# Upload the build directory
path: 'build/'

- name: Deploy to GitHub Pages
id: deployment
Expand Down
2 changes: 1 addition & 1 deletion src/routes/+layout.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const prerender = true;
// export const trailingSlash = 'always';
export const trailingSlash = 'always';
3 changes: 3 additions & 0 deletions svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ const config = {
alias: {
'@/*': './src/lib/*',
},
paths: {
base: process.argv.includes('dev') ? '' : process.env.BASE_PATH
},
}
};

Expand Down

0 comments on commit 30b8d32

Please sign in to comment.