Free courses
DevOpsBeginnerFree
Deploy a Static Site: Commit to Local Production
Build a small website, add automatic checks on commit, and deploy it to a local web server with one command. You will package the site and see your changes live.
6 lessons 56 minNo account needed
Start lesson 1What you will learn
- Initialise a Git repository and make commits
- Write a test script that runs after each commit
- Package a static site into a compressed archive
- Deploy the site to a local web server with a script
- Check the deployed site and read its server log
Before you start
- Run commands in a terminal and edit text files
- Write a simple HTML page
- Understand what a version control commit is
Lessons
- Lesson 1: Create the site and first commitBuild a one-page site and commit it to a new Git repository.7 min
- Lesson 2: Add a post-commit testWrite a test script that checks the page text and add it as a Git post-commit hook.13 min
- Lesson 3: Package the siteCreate a compressed archive of the site files, ready for deployment.9 min
- Lesson 4: Run a local web serverStart a local web server that serves the site from a folder on your machine.10 min
- Lesson 5: Write a deploy scriptAdd a script that copies the archive to the server folder, extracts it, and restarts the server.7 min
- Lesson 6: Change, test, and deploy end to endChange the page, run the checks, deploy, and confirm the change is live.10 min