A portfolio that only lives on your laptop helps no one. A live link on your resume helps everyone who reads it.
In this guide I show how to put a static portfolio (HTML, CSS and JavaScript) online for free using GitHub, GitHub Desktop and GitHub Pages, with no command line needed. At the end, I show how the same files can move to AWS as your next step.
Visit my portfolio: https://vishalpatil-devops-aws.github.io/portfolio/
What you need
| Requirement | Details |
|---|---|
| GitHub account | Free account at github.com |
| GitHub Desktop | Free app from desktop.github.com |
| Portfolio files | A folder with index.html, plus css/, js/ and images/
|
| File Explorer | To extract the ZIP and copy files |
The workflow in short: prepare the files, create a repository named <username>.github.io, clone it with GitHub Desktop, copy your files in, commit and push, then turn on GitHub Pages.
Step 1: Prepare the portfolio
- In File Explorer, right-click your portfolio ZIP and choose Extract All..., then click Extract.
- Open the extracted folder and check that the main page is named exactly
index.html. - Double-click
index.htmlto test it in your browser.
Tip: In File Explorer click View > Show > File name extensions, so you can be sure the file is
index.htmland notindex.html.txt.
Step 2: Create a GitHub account
- Go to github.com and click Sign up.
- Enter your email, password and username, then verify your email.
Note: Your username becomes your website address. If your username is
vishal-dev, your site will behttps://vishal-dev.github.io/. Choose a professional username.
Step 3: Install GitHub Desktop
- Download it from desktop.github.com and run the installer.
- Click Sign in to GitHub.com, then Authorize desktop in the browser.
- On the Configure Git screen, enter your name and email, then click Finish.
Step 4: Create the repository
For a personal portfolio the repository name must be exactly <username>.github.io.
- On GitHub click + > New repository.
- Name it
<username>.github.ioand set it to Public. - Tick Add a README file and click Create repository.
You can also create the repository from GitHub Desktop (File > New repository), but creating it on github.com first is simpler for beginners.
Step 5: Clone the repository
- In GitHub Desktop click File > Clone repository....
- Select
<username>.github.iofrom the GitHub.com tab and click Clone. - Click Repository > Show in Explorer to open the local folder.
Step 6: Copy your portfolio files
- Open your extracted portfolio folder, press Ctrl + A to select everything, then Ctrl + C.
- Open the cloned folder and press Ctrl + V.
Warning: Copy the contents of the portfolio folder, not the folder itself.
index.htmlmust sit at the top level of the repository, or GitHub Pages will show a 404 error.
Step 7: Commit and push
- In GitHub Desktop, check that your files are listed under Changes.
- Type a summary such as
Add portfolio websiteand click Commit to main. - Click Push origin.
- Open your repository on github.com and confirm the files are there.
Step 8: Enable GitHub Pages
- In your repository click Settings > Pages.
- Under Build and deployment, set Source to Deploy from a branch.
- Choose branch main and folder / (root), then click Save.
- Open the Actions tab and wait for a green tick on "pages build and deployment". It usually takes 1 to 3 minutes.
Step 9: Open your live site
Visit https://<username>.github.io/ and check every section on desktop and on your phone. Add the link to your LinkedIn profile, resume and GitHub profile.
Updating your portfolio later
- Edit your files in the cloned folder.
- In GitHub Desktop write a commit message and click Commit to main, then Push origin.
- Wait a minute or two. GitHub Pages redeploys automatically. Press Ctrl + F5 to bypass the browser cache.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| 404 error |
index.html is in a sub-folder, or Pages is not enabled |
Move index.html to the repository root and check Settings > Pages |
| CSS or images missing | Wrong path or different letter case (GitHub is case-sensitive) | Match file names exactly and use relative paths like css/style.css
|
| Site not updating | Change not pushed, still deploying, or cache | Push origin, check Actions for a green tick, then press Ctrl + F5 |
| Push rejected | The remote has changes you do not have | Fetch origin, Pull origin, then Push origin again |
| Wrong branch | Pages points to another branch | Select the branch that holds your files in Settings > Pages |
| Sign-in problems | Expired sign-in | File > Options > Accounts, sign out and sign in again |
Optional: use a custom domain
- Buy a domain from a registrar.
- Add four A records for the root domain pointing to
185.199.108.153,185.199.109.153,185.199.110.153and185.199.111.153, and a CNAME record forwwwpointing to<username>.github.io. - In Settings > Pages > Custom domain, enter your domain and click Save, then tick Enforce HTTPS when the DNS check passes.
DNS changes can take up to 24 hours. Check GitHub's documentation for the latest values.
Next step: take it to AWS
Because the portfolio is plain HTML, CSS and JavaScript, the same files can also be hosted on AWS. That makes this a good first project for learning AWS services.
| Option | What it is | Good for |
|---|---|---|
| GitHub Pages (this guide) | Free static hosting from a GitHub repository | A fast start with no AWS account |
| AWS Amplify Hosting | Managed hosting that connects to your GitHub repository and redeploys on push | Keeping the same GitHub Desktop workflow |
| Amazon S3 static website | Files stored in an S3 bucket set up as a website | Learning S3 basics |
| Amazon S3 + CloudFront (+ Route 53) | S3 as origin, CloudFront for HTTPS and speed, Route 53 for a custom domain | A production-style setup |
A simple path: keep your GitHub repository as the source of truth, then in the AWS Console open AWS Amplify, connect GitHub, pick your repository and the main branch, and deploy. Or upload the same files to an S3 bucket, enable static website hosting, and add CloudFront and Route 53.
Warning: AWS services can generate charges. Set up an AWS Budget or billing alarm before you try them. AWS Console screens change over time, so follow the current AWS documentation for exact steps.
Final checklist
- Portfolio extracted and
index.htmlconfirmed - GitHub account created and GitHub Desktop signed in
- Public repository named
<username>.github.iocreated and cloned - Files copied with
index.htmlat the top level - Committed, pushed and verified on github.com
- GitHub Pages enabled (main, / (root)) with a green tick in Actions
- Live site opened and tested, link added to LinkedIn and resume
- Billing alarm planned before trying AWS hosting
Conclusion
With a free GitHub account, GitHub Desktop and about 30 minutes, you can have a live portfolio at https://<username>.github.io/. From there, moving the same site to AWS is a practical way to keep learning.
Created by Vishal Patil
- LinkedIn: https://www.linkedin.com/in/vishalpatil-devops-aws/
- dev.to: https://dev.to/vishal_patil_aws
- GitHub: https://github.com/VishalPatil-DevOps-AWS
- Portfolio: https://vishalpatil-devops-aws.github.io/portfolio/
Top comments (0)