Module 5 ยท Testing, security and shipping Lesson 15 of 15
A pipeline and a live URL
A build that runs your tests on every push, then deploys the green version, is the last piece that makes a project look like real software - and gives you a URL to put on your resume.
The concept
Deploy the front end and the API separately if that is simpler; a static site host plus a small server host with a database is a complete stack for a portfolio piece.
Keep secrets - the database URL, the JWT key - in the host environment, never in the repository, and set the same values on every environment the app runs in.
name: ci
on:
push:
branches: [main]
jobs:
build-test-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npm ci
- run: npm test
- run: npm run build
# then deploy the built output to your host (static + API)Worked example
A GitHub Actions workflow that installs, tests and deploys on the main branch means a mistake fails in the pipeline instead of on the live site.
Your practice task
Add a CI workflow that runs your tests, and connect it to a free host so main deploys itself.
Do this before moving on. Reading a solution teaches the shape of it; typing it teaches you.
Key takeaway
Deploy the front end and the API separately if that is simpler; a static site host plus a small server host with a database is a complete stack for a portfolio piece.
Keep your place in this course
A free account saves which lessons you have finished and unlocks the certificate. The lesson itself stays free to read.
Create free account or sign inCourse complete
You finished every lesson.
Your certificate is ready, and the projects you built are the proof to attach to an application.
Almost there
15 lessons left of 15
Finish every lesson to unlock the certificate. Each one ends in a practice task โ do them and the final project brief writes itself.