Skip to content

Instantly share code, notes, and snippets.

@raivivek
Last active November 29, 2021 19:33
Show Gist options
  • Save raivivek/2789393b287b638384b88cd714fc75e6 to your computer and use it in GitHub Desktop.
Save raivivek/2789393b287b638384b88cd714fc75e6 to your computer and use it in GitHub Desktop.
Instructions for updating and deploying theparkerlab.org

Structure

The website is hosted from the repository scjparker.github.io. The repo has two branches:

  • master where the deployed website lives
  • source where the source code for the website lives

The content pushed to the master branch is automatically shown on the theparkerlab.org homepage by the GitHub.

Making changes

After cloning the repository, switch to the source branch. This can be done using following commands:

git clone https://github.com/scjparker/scjparker.github.io
cd scjparker.github.io
git fetch source
git checkout -b source

Note that the commands above only need to be run the first time you clone the repository. Once source branch is active, change any file you need to do and add and commit your changes.

git add <files updated>
git commit -m <message>

Once saved, push you changes to the repository source branch using

git push -u origin source

The website will be automatically built and deployed to the master branch using GitHub actions.

Previewing changes locally

If you wish to preview your changes locally before deploying, you will need to install development packages using the following instructions. Run these commands inside the root of your repository.

gem install bundler
bundle install
bundle exec jekyll serve -l

Last command will print a localhost address that you can visit in your browser to preview changes. If all looks good, add and commit your changes as described before and push them to GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment