Web Island Agency

Jekyll & Netlify: Deploy a website from GitHub

Jekyll & Netlify: Deploy a website from GitHub
Jekyll & Netlify: Deploy a website from GitHub

Drag-and-drop deployment is good enough if you don’t update your website often. However, it becomes annoying to build your static website locally and upload it to Netlify manually, if you do it every day. Fortunately, you can automate the website publishing by connecting Netlify website container to the project repository. For existing website follow this instruction:

  1. Open the website dashboard. You need to get to the Continuous Deployment section. Follow Settings → Build & deploy or Deploys → Deploy settings;
  2. Under Build settings title press Link site to Git button;
  3. Choose GitHub option and follow authorization instructions;
  4. Select repositories you would like to share with Netlify and press Save;
  5. You’ll get back to the Git linking interface with available repositories list. Choose the repository you would like to connect;
  6. Submit those deploy setting values:
    • Pick branch to deploy: master or your production branch;
    • Build command: JEKYLL_ENV=production jekyll build;
    • Publish directory: _site;
  7. Wait a bit for your website to get fetched and built. Once it’s finished, you’ll see Published status next to the deploy ID.

    If you’ve got Failed deploy status, click on the deploy link and check its logs to see a more descriptive error message.

Also, you can publish a new website from the GitHub repository. In your Netlify dashboard press the New site from Git button and follow the same steps (starting from the 3rd one) described above.

Join the discussion!

The article is published under the tags

Read more articles related to the topic