05 / Git & Deployment

Move from source code to a live site.

Use Git to record meaningful changes, GitHub to collaborate and a build pipeline to publish verified static output.

Git records snapshots

Your working tree contains current files, the staging area selects the next snapshot and a commit records that snapshot with its history.

git status
git add index.html src/
git commit -m "Revise learning homepage"
git push origin main

Git is not GitHub

Git is the version-control system on your computer. GitHub hosts Git repositories and adds review, issues, automation and access controls.

Commit source, not generated dependencies

node_modules/
dist/
.env
.env.*

Commit package-lock.json for reproducible installs. Never commit secrets.

Deploy this static Vite site

The platform checks out the source, installs dependencies, runs the build and publishes dist/.

Install command: npm ci
Build command: npm run build
Static assets directory: ./dist
Function file path: leave blank

Preview the production build locally and test navigation before pushing. Deployment should repeat a process you already verified.

Backend is optional

Continue only when the project needs private server logic or data.

Node.js fundamentals →