Skip to content

Instantly share code, notes, and snippets.

View ramtob's full-sized avatar

Ram Tobolski ramtob

View GitHub Profile
@ramtob
ramtob / .block
Created October 8, 2016 12:45
fresh block
license: mit
@ramtob
ramtob / .block
Last active October 11, 2016 09:29
Block: Parallel Links in a Force Layout Graph (d3.js)
license: mit
@ramtob
ramtob / .github-pages-with-travis.md
Last active January 17, 2019 13:06
How to connect a github project to github-pages with automatic deployment via travis
  • Enter the project settings. Under GitHub Pages section, set Source to Master branch (we will change the branch later).
  • Add the github-pages link (e.g. https://ansyn.github.io/project-name/) to the project's description line at github.
  • To the project's root, add file named .travis.yml (see file contents below in this gist, copy from there).
  • To the project's package.json file, scripts section, add the following two lines:
"predeploy": "npm run build -- --base-href=https://ansyn.github.io/project-name/ --deploy-url=https://ansyn.github.io/project-name/",
"deploy": "gh-pages --repo https://$GITHUB_TOKEN@github.com/AnSyn/project-name.git -d dist/project-name"

And replace project-name with the current project's name

  • Add gh-pages add a dev dependency: from a terminal, enter yarn add gh-pages --dev