Build your website.

A step-by-step guide to creating and deploying a personal site.

Setup

Quick version

Install Node.js. Create a GitHub account. Create a Cloudflare account.

Node.js

Node.js runs JavaScript on your computer. We use it to run the dev server and build tools.

node --version

Run this after installing to verify it works. You should see v18 or higher.

GitHub

GitHub stores your code online and tracks changes. When you push code, Cloudflare automatically rebuilds your site.

Cloudflare Pages

Free hosting with HTTPS, global CDN, and automatic deployments. No configuration needed.

Build

Quick version
git clone https://github.com/Luki3532/testport.git my-site
cd my-site
npm install
npm run dev

Clone the template

This copies the project to your computer.

git clone https://github.com/Luki3532/testport.git my-site

Install dependencies

Downloads the build tools (Vite, TypeScript) into node_modules.

cd my-site
npm install

Start the dev server

Opens your site at localhost:3000 with live reload.

npm run dev

Project files

index.htmlContent and structure
styles.cssColors, layout, typography
script.tsInteractivity

GitHub

Quick version

Create a repo at github.com/new, then:

git remote set-url origin https://github.com/YOU/YOUR-REPO.git
git add .
git commit -m "Initial commit"
git push -u origin main

Create a repository

  1. Go to github.com/new
  2. Name it (e.g., my-site)
  3. Leave "Add a README" unchecked
  4. Click Create repository

Connect your local project

Point your project to your new repo instead of the template.

git remote set-url origin https://github.com/YOU/YOUR-REPO.git

Push your code

git add .
git commit -m "Initial commit"
git push -u origin main

Future updates

After making changes:

git add .
git commit -m "Describe what changed"
git push

Deploy

Quick version

Cloudflare Dashboard → Workers & Pages → Create → Pages → Connect to Git → Select repo → Build command: npm run build → Output: dist → Deploy

Connect Cloudflare to GitHub

  1. Open dash.cloudflare.com
  2. Go to Workers & Pages
  3. Click Create → Pages → Connect to Git
  4. Authorize GitHub access
  5. Select your repository

Build settings

Build commandnpm run build
Output directorydist

How it works

Push to GitHub
Cloudflare builds
Site goes live

Your site will be at your-project.pages.dev

Troubleshooting

"npm not found"

Node.js isn't installed. Download from nodejs.org and restart your terminal.

"git not found"

Install Git from git-scm.com

Build fails on Cloudflare

Check build logs. Usually it's a wrong build command or output directory.

Changes not showing

Make sure you pushed: git add . && git commit -m "update" && git push