๐Ÿ“Š We use cookies & analytics to improve your experience. Learn more
Latest

Full-Stack Web Development Bootcamp Module 5 ยท Lesson 15 of 15

0% Exit to course

Module 5 ยท Testing, security and shipping Lesson 15 of 15

A pipeline and a live URL

Learning objective

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.

YAML
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.

Create free account or sign in

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.

Next recommended course Data Analytics with SQL & Excel