Build your website.
A step-by-step guide to creating and deploying a personal site.
Setup
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
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.html | Content and structure |
styles.css | Colors, layout, typography |
script.ts | Interactivity |
GitHub
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
- Go to github.com/new
- Name it (e.g.,
my-site) - Leave "Add a README" unchecked
- 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
Cloudflare Dashboard → Workers & Pages → Create → Pages → Connect to Git → Select repo → Build command: npm run build → Output: dist → Deploy
Connect Cloudflare to GitHub
- Open dash.cloudflare.com
- Go to Workers & Pages
- Click Create → Pages → Connect to Git
- Authorize GitHub access
- Select your repository
Build settings
| Build command | npm run build |
| Output directory | dist |
How it works
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