This gist helps auto deploy build artifacts into gh-pages branch without needing for interupting git history on the master branch. By taking advantage of npx (if you haven't heard about npx yet, read this blog post) to avoid creating another npm repo :).
Follow the below instructions.
- In you module package.json file add new script target as
"deploy": "npx https://gist.github.com/dsadhanala/0157697871892caaf2793170a61e6ebd"
- Assuming you have a task that transpiles your code and place the beployable artifacts into
distfolder, please name this target asreleaselike below.
"release": "your bundling tasks"
- Run
npm run deploy
If you have exsiting build setup that creates build artifacts and place in to dist then do below.
- add new script target package.json as
"release": "echo 'skip release'" - run
npx https://gist.github.com/dsadhanala/0157697871892caaf2793170a61e6ebd