Skip to content

How to publish the website on GitHub Pages

Vasily Strelyaev edited this page Jan 21, 2021 · 17 revisions

You will need to install Ruby v2.6 or earlier, and the dependencies.

bundle install

Make sure you don't have Ruby >= 2.7 or Jekyll >= 4 installed side-by-side. They are not supported and can interrupt website builds. Make sure to remove them if you installed them earlier on this machine.

To install Ruby, you may need to install the MSIS2 component and run ridk install (see https://github.com/oneclick/rubyinstaller2#the-ridk-command).

After that, you are ready to build the website.

  1. Make sure that master and gh-pages branches in your fork are even with upstream.

    I usually do git rebase upstream/master for master and git reset --hard upstream/gh-pages for gh-pages because rebase doesn't do well for the latter.

    Don't forget to fetch upstream beforehand.

  2. Checkout master:

    git checkout master

  3. Build the website:

    gulp build-website-production

  4. Checkout gh-pages:

    git checkout gh-pages

  5. copy /site/deploy/**/* to the root directory replacing all files:

    cp -fR site/deploy/** . (in bash)

    /site/deploy/**/* survives checkout to gh-pages as it's git-ignored

  6. stage, commit to gh-pages, push this branch, then pull request

After the website is pushed to your fork, you can preview it at https://yourname.github.io/testcafe (if your fork has GitHub pages enabled) before merging the pull request

Clone this wiki locally