Skip to content

Instantly share code, notes, and snippets.

@anupkrbid
Last active July 6, 2018 05:42
Show Gist options
  • Save anupkrbid/d5c6d12390c45350e07bfe6ea13ab05f to your computer and use it in GitHub Desktop.
Save anupkrbid/d5c6d12390c45350e07bfe6ea13ab05f to your computer and use it in GitHub Desktop.
Deploying ignored dist folder to GitHub Pages. Commit this script and call it after having built your dist.
#!/bin/sh
git commit -am "Save uncommited changes (WIP)"
git branch --delete --force gh-pages
git checkout --orphan gh-pages
git add -f dist
git commit -m "Rebuild GitHub pages"
git filter-branch -f --prune-empty --subdirectory-filter dist && git push -f origin gh-pages && git checkout -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment