professional headshot photo of Mr Palumbo

How to Create a Simple Portfolio Website

Build a professional portfolio website using only GitHub Codespaces and Cloudflare Pages. This tutorial requires no software downloads and costs only the price of a domain name.

Why Create a Portfolio Website?

A portfolio website showcases your work to potential employers and clients. It demonstrates your web development skills and establishes your online presence as a developer.

Why Not Use a Website Builder?

Website builders limit your control and learning potential. Building from scratch gives you complete freedom and valuable development experience.

Steps to Complete:

  1. Create a GitHub Repository
  2. Use GitHub Codespaces (Browser-Based IDE)
  3. Build Your Portfolio Website
  4. Commit and Push Your Code
  5. Deploy with Cloudflare Pages
  6. Purchase a Domain Name
  7. Connect Your Domain to Cloudflare Pages

Step 1: Create a GitHub Repository

Create a GitHub Account

GitHub stores and shares your code. Create an account if you don't have one.

Create a GitHub Repository

Create a new repository titled portfolio-website:

  • Select Private repository (can be made public later)
  • Don't create a README (we'll add one later)
  • Click "Create repository"
GitHub form to create new repository

Screenshot: GitHub repository creation form

Step 2: Use GitHub Codespaces

GitHub Codespaces provides a full Visual Studio Code environment in your browser.

Open Your Repository in Codespaces

  1. Navigate to your repository on GitHub
  2. Click the green "Code" button
  3. Select the "Codespaces" tab
  4. Click "Create codespace on main"
GitHub Codespaces button location

Screenshot: GitHub Codespaces button location

The environment includes Visual Studio Code interface, integrated terminal, file explorer, and live preview capabilities.

GitHub Codespaces development interface

Screenshot: GitHub Codespaces development interface

Step 3: Build Your Portfolio Website

Create a professional portfolio using HTML and CSS in a single file.

Create Your Portfolio File

  1. Right-click in the file explorer panel
  2. Select "New File" and name it index.html
Creating index.html file in Codespaces

Screenshot: Creating index.html file in Codespaces

Get the Portfolio Code

Use my complete portfolio template:

To use this template:

  1. Visit the repository link above
  2. Click on the index.html file
  3. Click the "Copy raw contents" button (looks like a clipboard)
  4. Paste the code into your index.html file in Codespaces
Copying raw contents from GitHub repository

Screenshot: Copying raw contents from GitHub repository

Customize Your Content

Personalize your portfolio:

  • Add your actual name
  • Add social media links
  • Write an "About Me" section
  • Customize colors in the CSS

Preview Your Website

See your website in action:

  1. Open terminal in Codespaces (Terminal → New Terminal)
  2. Run: python3 -m http.server 8000
  3. Click "Open in Browser" in the terminal

python3 -m http.server 8000

Running Python HTTP server in Codespaces terminal

Screenshot: Running Python HTTP server in Codespaces terminal

Your website will be accessible at an obscure url like https://your-codespace-name-username.github.dev:8000/

Tip: If you close the website tab, click the "PORTS" button in the terminal area and click "Open in Browser" for port 8000.

Ports button in Codespaces terminal

Screenshot: Ports button in Codespaces terminal

Step 4: Commit and Push Your Code

Save your work to GitHub using either the GUI or terminal.

Method 1: Using the Web IDE GUI (Recommended)

The easiest way to commit and push your changes:

  1. Click the "Source Control" icon in the left sidebar (looks like a branch)
  2. You'll see your index.html file listed as "Changes"
  3. Click the "+" button next to the file to stage it
  4. Type a commit message in the text box (e.g., "Initial portfolio website")
  5. Click the checkmark button to commit
  6. Click the "..." menu and select "Push" to upload to GitHub
Source Control panel in GitHub Codespaces

Screenshot: Source Control panel in GitHub Codespaces

Committing and pushing via GUI

Screenshot: Committing and pushing via GUI

Committing and pushing via GUI 2

Screenshot: Committing and pushing via GUI 2

Pro Tip: You can use AI to write better commit messages. In the commit message box, try describing what you changed, and GitHub Copilot (if enabled) can suggest a professional commit message.

Method 2: Using the Terminal

If you prefer command line:

  1. Add all files to the staging area:

    git add .

  2. Create a commit with a message:

    git commit -m "Initial portfolio website"

  3. Push your changes to GitHub:

    git push

GitHub commit and push process

Screenshot: GitHub commit and push process

Verify Your Code is on GitHub

After pushing, refresh your GitHub repository page. You should see your index.html file listed. Your code is now safely stored and ready for deployment!

Files visible in GitHub repository

Screenshot: Files visible in GitHub repository

Step 5: Deploy with Cloudflare Pages

Cloudflare Pages automatically deploys your website from GitHub. It's completely free.

Create a Cloudflare Account

  1. Go to Cloudflare Pages
  2. Click "Sign up" and create a free account
  3. Verify your email address
Cloudflare Pages signup page

Screenshot: Cloudflare Pages signup page

Connect Your GitHub Repository

  1. Click "Create a project"
  2. Select "Connect to Git"
  3. Choose GitHub as your Git provider
  4. Authorize Cloudflare to access your GitHub account
  5. Select your portfolio-website repository

Configure Build Settings

For static websites, use these minimal settings:

  • Project name: Choose a name (e.g., "my-portfolio")
  • Production branch: main
  • Build command: Leave empty
  • Build output directory: Leave empty
Cloudflare Pages build settings

Screenshot: Cloudflare Pages build settings configuration

Deploy Your Site

Click "Save and Deploy". Cloudflare will:

  1. Pull your code from GitHub
  2. Build your website
  3. Deploy
Successful Cloudflare Pages deployment

Screenshot: Successful Cloudflare Pages deployment

Step 6: Purchase a Domain Name

While your site works on the .pages.dev URL, a custom domain looks more professional.

Purchase Through Cloudflare Registrar

Since you're using Cloudflare Pages, purchasing through Cloudflare Registrar simplifies setup:

  1. In your Cloudflare dashboard, go to "Registrar"
  2. Search for your desired domain name
  3. Add to cart and complete purchase
Cloudflare Registrar domain search

Screenshot: Cloudflare Registrar domain search

Step 7: Connect Your Domain to Cloudflare Pages

Connect your custom domain to your Cloudflare Pages deployment.

Add Custom Domain in Cloudflare Pages

  1. Go to your project settings
  2. Click "Custom domains" tab
  3. Click "Set up a custom domain"
  4. Enter your domain name (e.g., yourname.com)
  5. Click "Continue"
  6. Click "Activate"
Setting up custom domain in Cloudflare Pages

Screenshot: Setting up custom domain in Cloudflare Pages

Activate custom domain in Cloudflare Pages

Screenshot: Activate custom domain in Cloudflare Pages

Configure DNS Settings

If purchased through Cloudflare Registrar, DNS settings are automatic. Otherwise:

  1. Go to your domain registrar's DNS settings
  2. Add a CNAME record pointing to your Cloudflare Pages URL
  3. Wait for DNS propagation (up to 24 hours)
DNS configuration for custom domain

Screenshot: DNS configuration for custom domain

Test Your Website

  1. Wait a few minutes for changes to propagate
  2. Visit your custom domain (e.g., https://yourname.com)

Congratulations! You're Live!

You've successfully created and deployed your portfolio website:

  • ✅ GitHub repository for version control
  • ✅ Professional portfolio website
  • ✅ Deployed to Cloudflare Pages (free hosting)
  • ✅ Connected custom domain name
  • ✅ Established online presence as a developer

Making Updates

To update your website, edit the index.html file in your GitHub repository, commit, and push. Cloudflare will automatically deploy your changes.

Push to production

Screenshot: Push to production

Next Steps

Enhance your portfolio:

  • Add projects: Include new projects as you build them
  • Improve design: Experiment with colors, layouts, and animations
  • Add blog section: Share your thoughts on technology
  • Include contact form: Make it easy for employers to reach you
  • Optimize for mobile: Ensure great experience on all devices