This guide will walk you through the process of deploying your robotics engineering portfolio website to GitHub Pages, which provides free hosting directly from your GitHub repository.
- A GitHub account
- Git installed on your local machine
- Basic familiarity with Git commands
- Log in to your GitHub account at github.com
- Click the "+" icon in the top-right corner and select "New repository"
- Name your repository:
yourusername.github.io(replaceyourusernamewith your actual GitHub username) - Make sure the repository is set to "Public"
- Click "Create repository"
Note: Using the format
yourusername.github.iofor your repository name will make your site available athttps://yourusername.github.io. If you use a different name, your site will be available athttps://yourusername.github.io/repository-name.
Open your terminal or command prompt and run:
git clone https://github.com/yourusername/yourusername.github.io.git
cd yourusername.github.ioCopy all the files from the portfolio website directory to your local repository folder. Make sure to include:
- All HTML files
- The
_layoutsdirectory - The
_includesdirectory - The
_projectsdirectory - The
assetsdirectory with CSS, JS, and images - The
_config.ymlfile - Any other necessary files
- Create a file named
Gemfilein the root of your repository with the following content:
source "https://rubygems.org"
gem "github-pages", group: :jekyll_plugins
gem "jekyll-seo-tag"
gem "jekyll-sitemap"- Make sure your
_config.ymlfile includes the following settings:
# Update these with your information
title: Your Name - Robotics Engineering Portfolio
description: A showcase of my robotics engineering projects and skills
url: "https://yourusername.github.io" # Replace with your GitHub Pages URL
# Build settings
markdown: kramdown
remote_theme: pages-themes/minimal@v0.2.0
plugins:
- jekyll-remote-theme
- jekyll-seo-tag
- jekyll-sitemap
collections:
projects:
output: true
permalink: /projects/:path/
# Default front matter for projects
defaults:
- scope:
path: ""
type: "projects"
values:
layout: "project"Run the following commands to commit your files and push them to GitHub:
git add .
git commit -m "Initial commit of portfolio website"
git push origin main- Go to your repository on GitHub
- Click on "Settings"
- Scroll down to the "GitHub Pages" section
- Under "Source", select "main" branch
- Click "Save"
GitHub will now build your site. This process usually takes a few minutes.
After GitHub has built your site, you can access it at https://yourusername.github.io. If you encounter any issues, check the "Actions" tab in your repository to see the build logs.
If you have a custom domain, you can configure GitHub Pages to use it:
-
Go to your repository's "Settings"
-
Scroll down to the "GitHub Pages" section
-
Under "Custom domain", enter your domain name (e.g.,
www.yourname.com) -
Click "Save"
-
Configure your domain's DNS settings:
- For an apex domain (e.g.,
yourname.com), create A records pointing to GitHub's IP addresses:185.199.108.153 185.199.109.153 185.199.110.153 185.199.111.153 - For a subdomain (e.g.,
www.yourname.com), create a CNAME record pointing toyourusername.github.io
- For an apex domain (e.g.,
-
Create a file named
CNAMEin the root of your repository with your custom domain:www.yourname.com
To update your website in the future:
- Make changes to your local files
- Commit and push the changes:
git add . git commit -m "Update website content" git push origin main
GitHub will automatically rebuild your site with the new changes.
If your site isn't displaying correctly:
- Check the "Actions" tab in your repository to see if there are any build errors
- Verify that your repository name is correct (
yourusername.github.io) - Make sure your files are in the correct structure for Jekyll
- Check that your
_config.ymlfile is properly formatted
For more detailed information, refer to the GitHub Pages documentation.