How to deploy a svelte project to github pages on custom domain

Nathan Puls
Mar 5, 2024

do quick start at bottom of this page https://github.com/metonym/sveltekit-gh-pages

in github settings/pages change default branch to gh-pages

add custom domain

in code tab switch to gh-pages

in svelte.config.js switch base to
base: process.env.NODE_ENV === “production” ? “” : “”,

yarn build
yarn deploy

ask chat GPT if you get stuck

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response