Last active
August 19, 2020 13:14
-
-
Save MushuLeDragon/9b7d17201430f2365cb117b8f5460693 to your computer and use it in GitHub Desktop.
Way to publish subfolder on Github Pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Commands to set a subfolder on Github Pages instead ROOT | |
# Inspired from | |
# - https://gist.github.com/cobyism/4730490 | |
# And | |
# - https://stackoverflow.com/a/36782614/7998119 | |
# Command to publish on Remote | |
git subtree push --prefix build_folder origin gh-pages | |
# Command to update the branch after a commit | |
git push origin `git subtree split --prefix build_folder master`:gh-pages --force | |
# Where build_folder is the target folder to publish | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment