Obliviadge Obliviadge - 1 month ago 21x
TypeScript Question

How can you publish a typescript website to github pages using Visual Studio

So I made a Typescript project with visual studio.

It works fine when I launch it with visual studio.

But if I try to push it to my github page, it will put the

in a subfolder and I get a 404 error when I try to load my website. Even if I try to reference the index.html in the website url it doesn't really work.

So I was wondering if it's possible to only publish the needed items.

I think I would only need the subfolder.

Correct me if I am wrong though.

I also have the github extension for Visual Studio installed.

Project in VS


You need to push a branch named gh-pages in order to view it as a website.

Create a new branch and then move the file into the root folder of the branch, upload it to the gh-pages and you set to go.

Check this out:


This is how your file should be inside your root folder.

enter image description here