Code your project as usual using parcel /path/to/index.pug
When you're finished, run parcel build --public-url <name-of-your-github-repo> -d docs /path/to/index.pug
For example, mine is parcel build --public-url /tower-of-hanoi -d docs pug/index.pug
This will put your output into a /docs
folder.
git add
and git commit
all the newly generated files. This should be on the master branch
git push origin master
to push to github
- Go to your github's project settings
- Scroll down to the
github pages
section - Under the
source
dropdown selectmaster branch /docs
folder
Then you're done!
Every time you want to update your project, you'll have to do that parcel build
command and commit all the files in /docs
again.