At the end of the previous lesson, publishing a version of Colmena Bookings required a long sequence of manual steps: running the lint, the type check, the unit tests and the Cypress tests; building; uploading the source maps and deleting them; building the image; deploying it to staging; running scripts/check-deployment.sh; and repeating the deployment in production. Every manual step is an opportunity to skip one ("the E2E tests take ages, I'll run them later"), to publish from the wrong branch or for only one person on the team to know how to do it. Continuous integration and deployment (CI/CD) turn that sequence into an automated process that runs the same way for every change, that will not let code that breaks the tests be merged, and that takes each approved version all the way to production with a single click. In this lesson you will build that process with GitHub Actions for Colmena Bookings: a continuous integration workflow for every pull request, deployed previews of every change, automatic deployment to staging and deployment to production with manual approval, together with secrets management, branch protection, dependency updates, an equivalent workflow for colmena-web, keeping time and costs under control, and monitoring and rollback after each deployment.
Contents
- Continuous integration, continuous delivery and continuous deployment
- Anatomy of a GitHub Actions workflow
- Preparing Colmena for continuous integration
- The continuous integration workflow:
ci.yml - E2E tests in continuous integration
- Previews of every pull request
- Continuous deployment:
cd.yml - Secrets, variables and environments
- Branch protection and required checks
- Dependency updates
- The
colmena-webworkflow - Time and costs
- Monitoring and rollback after deployment
- Try it
- Continuous integration, continuous delivery and continuous deployment
These are three linked practices, each one built on top of the previous one:
| Practice | What it means | What makes it possible | In Colmena |
|---|---|---|---|
| Continuous integration (CI) | Each change is integrated into the main branch frequently (several times a day, not once a month), and each integration is checked automatically | Reliable, fast automated tests | Lint, types, unit tests, build and E2E on every pull request |
| Continuous delivery | The main branch is always ready to be published, and publishing is a business decision carried out with one click | Continuous integration plus an automated, repeatable deployment | Production: on publishing a release, with manual approval |
| Continuous deployment | Every change that passes the checks is deployed automatically, with no human intervention | Complete confidence in the checks, monitoring and fast rollback | Staging: every merge into main |
The abbreviation CD is used for the last two, which causes confusion. What matters is the difference: in continuous delivery, a person decides when to publish; in continuous deployment, nobody decides: if the tests pass, it gets published. Colmena uses continuous deployment to staging and continuous delivery to production, a very common combination.
The complete journey we will build:
flowchart TB
subgraph PR["Pull request (ci.yml)"]
A1["Quality<br/>lint · formatting · types"]
A2["Unit tests<br/>with coverage"]
A3["Build<br/>dist/"]
A4["E2E tests<br/>chrome · firefox"]
A3 --> A5["Preview<br/>on Netlify"]
end
PR -- "review + green checks<br/>→ merge into main" --> M
subgraph M["Push to main (cd.yml)"]
B1["Full CI"] --> B2["Docker image<br/>ghcr.io: commit"] --> B3["Deployment to staging<br/>+ check"]
end
M -- "the team validates staging<br/>and publishes a v1.4.0 release" --> R
subgraph R["Published release (cd.yml)"]
C1["Full CI"] --> C2{"Manual<br/>approval"} --> C3["Image tagged v1.4.0<br/>→ production + check"]
end
Notice a property that comes from 10-02: the image that reaches production is the same one that was tested on staging, just with a different tag and different environment variables. It is not rebuilt.
- Anatomy of a GitHub Actions workflow
GitHub Actions runs workflows defined in YAML files inside the repository's .github/workflows/ folder. A minimal example, to pin down the vocabulary:
# .github/workflows/example.yml
name: Example # name shown in the Actions tab
on: # EVENTS that trigger it
pull_request: # when a pull request is opened or updated
push:
branches: [main] # when commits arrive on main
jobs: # JOBS: in parallel by default
tests:
name: Tests # name shown (and the name of the check on the PR)
runs-on: ubuntu-latest # RUNNER: a fresh virtual machine for this job
steps: # STEPS: in order, on the same machine
- uses: actions/checkout@v7 # a reusable ACTION: downloads the repository
- uses: actions/setup-node@v7
with: # the action's parameters
node-version-file: .nvmrc
- run: npm ci # a shell command
- run: npm test
build:
name: Build
needs: tests # DEPENDENCY: waits for "tests" to finish successfully
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: npm ci && npm run build| Concept | What it is | Important detail |
|---|---|---|
Event (on) |
What triggers the workflow | pull_request, push, release, schedule (cron), workflow_dispatch (manual button), workflow_call (reuse) |
| Job | A set of steps that runs on a runner | Each job starts on a clean machine: it cannot see another job's files unless they are passed as artefacts |
| Runner | The machine that runs the job | ubuntu-latest is a GitHub virtual machine with Node, browsers, Docker, curl, jq... preinstalled |
| Step | A command (run) or an action (uses) |
The steps in a job share a disk and run in order; if one fails, the following ones are skipped (unless if: always() or failure()) |
Action (uses) |
A reusable step published in a repository | It is pinned to a version (@v7); third-party ones are better pinned to the exact hash of a commit (section 8.4) |
needs |
A dependency between jobs | Without needs, jobs run in parallel |
Matrix (strategy.matrix) |
Runs the same job with several combinations of values | We will use it to run the E2E tests in two browsers |
${{ }} expressions |
Values calculated from contexts (github, env, secrets, vars, matrix, steps...) |
They are evaluated before the step runs |
if |
A condition for running a job or a step | if: github.event_name == 'push' |
When a workflow runs for a pull request, each job appears on it as a check with its name, in green or red. Those names are the ones that will be required in section 9.
- Preparing Colmena for continuous integration
3.1 Scripts that check without modifying
Since 01-03, npm run lint has run eslint . --fix, and npm run format, prettier --write src/. Locally that is convenient; in continuous integration it is a mistake: they would fix the problems on the virtual machine (which is destroyed when it finishes) and the check would pass even though the code in the repository still had them. In CI you must check, not fix. Add to package.json:
--max-warnings=0: warnings also make the check fail. Without this option, warnings pile up because they never block anything.prettier --checkreports the unformatted files and exits with an error, without touching them.
The rest already exists: type-check (09-02), test:coverage (08-01), build (10-01), build:e2e and preview:e2e (08-04).
3.2 Coverage thresholds
In 08-01 we said that coverage is a compass, not a target, and mentioned the thresholds option. In continuous integration it has a specific purpose: preventing coverage from dropping without anyone noticing. In vitest.config.js, inside coverage:
// vitest.config.js: inside test.coverage
thresholds: {
lines: 80,
functions: 80,
statements: 80,
branches: 70
}Adjust the numbers to whatever npm run test:coverage measures in your project today, slightly below it, and raise them as you add tests. An unattainable threshold only leads to someone lowering it to zero.
3.3 The version in the errors
In 10-01 we saw that a variable defined in the process environment beats any .env file. Continuous integration will take advantage of this to give each build its version identifier: the commit hash. In src/utils/errors.js, add the version to the event:
// src/utils/errors.js: in logError
const event = {
// ... the usual fields
environment: environment.name,
version: import.meta.env.VITE_VERSION ?? 'local',
...context
}That way, when an error arrives from production, the team will know exactly which code produced it, and the monitoring service will be able to link it to the source maps uploaded for that same version.
3.4 A Dockerfile for what has already been built
The multi-stage Dockerfile from 10-02 builds the application inside Docker. In continuous integration, the build has already been done (and tested) in its own job, so building it again would be slow and, above all, risky: there would be no guarantee that the image contained exactly what was checked. Create Dockerfile.release, which is the second stage of that Dockerfile, taking dist/ as it is:
# Dockerfile.release
# Colmena Bookings image from a dist/ already built and checked in CI.
# It is the final stage of the multi-stage Dockerfile from 10-02.
FROM nginx:stable-alpine
COPY nginx/default.conf.template /etc/nginx/templates/default.conf.template
COPY --chmod=755 nginx/40-colmena-config.sh /docker-entrypoint.d/40-colmena-config.sh
COPY dist/ /usr/share/nginx/html/
EXPOSE 80The .dockerignore from 10-02 excludes dist, and rightly so for the other Dockerfile. Docker allows an exclusions file per Dockerfile: if Dockerfile.release.dockerignore exists, it is used instead of the general one. Create it with the bare minimum:
* excludes everything, and the lines with ! include the two folders the image needs again.
- The continuous integration workflow:
ci.yml
ci.ymlCreate .github/workflows/ci.yml. We present it in full and then analyse it piece by piece (the E2E job and the preview job have sections of their own):
# .github/workflows/ci.yml
# Continuous integration for Colmena Bookings. It runs on every pull request
# and cd.yml reuses it before each deployment.
name: CI
on:
pull_request:
workflow_call:
# Least privilege: the GITHUB_TOKEN for these jobs can only read the repository
permissions:
contents: read
# A new push to the same PR cancels the previous run, which is no longer of interest.
# When cd.yml calls it, the group includes the event and the commit, and nothing is cancelled.
concurrency:
group: ci-${{ github.event_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
quality:
name: Quality
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm ci
env:
CYPRESS_INSTALL_BINARY: 0 # this job does not run Cypress
- name: Lint
run: npm run lint:ci
- name: Formatting
run: npm run format:check
- name: Types
run: npm run type-check
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm ci
env:
CYPRESS_INSTALL_BINARY: 0
- name: Tests with coverage and thresholds
run: npm run test:coverage
- name: Save the coverage report
if: always() # also if the tests fail: that is when it matters most
uses: actions/upload-artifact@v7
with:
name: coverage
path: coverage/
retention-days: 7
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm ci
env:
CYPRESS_INSTALL_BINARY: 0
- name: Build for production
run: npm run build
env:
VITE_VERSION: ${{ github.sha }} # beats any .env file (10-01)
- name: Upload the source maps to the error service
if: github.event_name != 'pull_request' # only for builds that get deployed
env:
SOURCEMAPS_TOKEN: ${{ secrets.SOURCEMAPS_TOKEN }}
run: |
# Colmena's monitoring service is fictitious (09-05). With a real one,
# its command-line tool would be used here to upload the .map files in
# dist/ linked to version $GITHUB_SHA, authenticated with $SOURCEMAPS_TOKEN.
echo "Maps that would be uploaded for $GITHUB_SHA: $(find dist -name '*.map' | wc -l)"
- name: Remove the source maps from what gets published
run: find dist -name '*.map' -delete
- name: Save dist/ as an artefact
uses: actions/upload-artifact@v7
with:
name: dist
path: dist/
retention-days: 7
if-no-files-found: error
# e2e: section 5
# preview: section 64.1 Events and reuse
pull_request: the workflow runs when a PR is opened and with every new commit on it. GitHub runs it on the result of merging the PR's branch withmain, so it checks the code as it would be after the merge.workflow_callturns the file into a reusable workflow:cd.ymlwill call it as if it were a job (section 7). That way, continuous integration is defined just once, and what is checked before deploying is exactly the same as what is checked on PRs.concurrencygroups runs together: two with the samegroupdo not run at the same time. On a PR, the group is the PR number and the previous run is cancelled (its results are no longer of interest). Whencd.ymlcalls the workflow, thegithubcontext is that of the calling workflow (pushorrelease): the group includes the event and the commit, andcancel-in-progressisfalse, so that publishing a release never cancels the check for a staging deployment of the same commit.
4.2 Jobs in parallel
quality, unit-tests and build have no needs: they run at the same time, each on its own machine. It is faster (the total time is that of the slowest job, not the sum) and gives more precise information: if the types fail, the PR shows "Quality" in red and "Unit tests" in green, and you know instantly where to look. The price is installing the dependencies on every machine, which caching makes cheaper.
4.3 The cached installation
node-version-file: .nvmrc: the same version of Node as on the team's machines (01-03) and in theDockerfile(10-02). A different version in CI is a classic source of "it works on my machine".cache: npm:setup-nodesaves npm's download cache (~/.npm, notnode_modules) with a key calculated frompackage-lock.json, and restores it on subsequent runs. As long as the lockfile does not change,npm cidownloads nothing from the internet.npm ci: an exact, clean installation according topackage-lock.json(10-02, section 5). If someone changedpackage.jsonwithout updating the lockfile, it fails, and that is what we want.CYPRESS_INSTALL_BINARY: 0: thecypresspackage is a development dependency and, when installed, downloads a binary of hundreds of megabytes. Only the E2E job needs it.
4.4 Build and artefacts
The build job leaves dist/ as an artefact: a file that GitHub stores linked to the run and that other jobs (in this workflow or in the one calling it) can download. It is the piece that makes "build once and deploy what was built" possible. It can also be downloaded from the run's page, which is useful for inspecting a specific build. Notice the order of the steps: the maps are uploaded (only when the build is going to be deployed) and deleted before the artefact is saved, so they never reach the image.
retention-days limits how long the artefacts are kept: they take up space in the repository's quota, and a build from a month ago is no longer of interest. if-no-files-found: error turns an empty dist/ (caused by a change in the configuration) into a visible failure, instead of an empty artefact.
4.5 Coverage
npm run test:coverage runs the tests once with coverage and, thanks to thresholds, fails if coverage drops below the threshold. The HTML report is saved as an artefact even if the tests fail (if: always()), so that you can open it and see which lines were left uncovered.
- E2E tests in continuous integration
In 08-04 we prepared everything for this moment: npm run test:e2e builds in e2e mode (with the stable simulation from .env.e2e), starts vite preview on port 4173 and runs Cypress without an interface. In GitHub Actions, the most convenient way to do this is Cypress's official action, which also installs the dependencies, caches the Cypress binary and waits for the server to respond. Add this job to ci.yml:
e2e:
name: E2E tests (${{ matrix.browser }})
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false # if it fails in one browser, finish the other one anyway
matrix:
browser: [chrome, firefox]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
- name: Cypress
uses: cypress-io/github-action@v7
with:
build: npm run build:e2e # vite build --mode e2e --outDir dist-e2e
start: npm run preview:e2e # vite preview on port 4173
wait-on: 'http://localhost:4173'
browser: ${{ matrix.browser }}
config: video=true
- name: Save screenshots and videos of the failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: cypress-${{ matrix.browser }}
path: |
cypress/screenshots
cypress/videos
if-no-files-found: ignore
retention-days: 7Let's analyse it:
- The matrix creates two jobs from this definition: "E2E tests (chrome)" and "E2E tests (firefox)", in parallel. GitHub's Ubuntu runners come with both browsers installed. Duplicating the E2E tests also duplicates their cost in minutes (section 12): it is a decision that makes sense because Colmena is used in both browsers and these tests cover the most critical paths.
fail-fast: false: by default, a failure in one combination of the matrix cancels the others. Here we want to know whether the failure happens in one browser or in both.build,startandwait-onare the equivalent of whatstart-server-and-testdid in thetest:e2escript: build, start the server in the background, wait for it to respond and then runcypress run. The action stops the server when it finishes.- The action runs
npm ciby itself (with the Cypress binary, which is needed here) and caches both npm's downloads and the binary: that is why this job does not usecache: npminsetup-node. config: video=trueenables video recording, which is disabled by default incypress.config.js(08-04). Cypress records in the browsers that support it; screenshots on failure are always generated.if: failure(): the screenshots and videos are only saved if something has failed, which is when you need them. In 08-04 we said that in continuous integration you cannot watch the run: these artefacts are your eyes. Download them from the run's page.timeout-minutes: 20: a server that does not start or a test that gets stuck waiting must not consume minutes for hours (the default limit is several hours).
- Previews of every pull request
Reviewing a PR's code is not the same as seeing the change working. A preview is a temporary deployment of the PR, with its own URL, that any reviewer (including someone from the product team who does not read code) can open. In 10-02 we decided to use a static platform for this: previews are numerous and short-lived, and they do not need the nginx image. Colmena uses Netlify, with its command-line tool. Add the last job to ci.yml:
preview:
name: Preview
# Only on PRs from the repository itself (not from forks) and not from Dependabot: they need secrets
if: >-
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository &&
github.actor != 'dependabot[bot]'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: preview
url: ${{ steps.deploy.outputs.url }}
steps:
- name: Download dist/
uses: actions/download-artifact@v8
with:
name: dist
path: dist
- name: Prepare the preview
env:
API_URL: ${{ vars.STAGING_API_URL }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
# SPA fallback and 404 for missing resources (10-02, section 3.1)
printf '/assets/* /404.html 404\n/* /index.html 200\n' > dist/_redirects
# Runtime configuration (10-02, section 9): the staging API
printf '{ "name": "preview-%s", "apiUrl": "%s" }\n' "$PR_NUMBER" "$API_URL" > dist/config.json
- name: Deploy to Netlify
id: deploy
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ vars.NETLIFY_SITE_ID }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
npx --yes netlify-cli@27 deploy --dir dist --no-build \
--alias "pr-$PR_NUMBER" --message "PR #$PR_NUMBER" --json > deployment.json
echo "url=$(jq -r '.deploy_url' deployment.json)" >> "$GITHUB_OUTPUT"- The condition excludes two cases in which the job would not have the secrets: PRs that come from a fork (GitHub does not hand the repository's secrets to third-party code, and rightly so) and those from Dependabot (section 10), which receive a separate set of secrets.
needs: build: it deploys the samedist/that has been built, without waiting for the E2E tests (the preview is for looking at; it certifies nothing).- Files generated for the occasion:
_redirects(Netlify's fallback) andconfig.json(with the staging API and an environment name that includes the PR number, which the header badge will display). Neither of them exists in the repository: they belong to this platform and this environment. netlify-cli@27pins the tool's major version: a new major version could change its options without warning.--no-buildis essential: current versions of the tool build the project before deploying unless told otherwise, and here it is already built.--aliasgives each PR a predictable address (pr-42--<site>.netlify.app). Without--prod, the deployment is a draft that does not affect the main site.$GITHUB_OUTPUTis the mechanism for a step to expose values:steps.deploy.outputs.url. By using it inenvironment.url, GitHub shows a button on the PR to open the preview, without writing any comment.- Variables and secrets are configured in the repository (section 8):
NETLIFY_AUTH_TOKENis secret;NETLIFY_SITE_IDandSTAGING_API_URLare not.
- Continuous deployment:
cd.yml
cd.ymlCreate .github/workflows/cd.yml:
# .github/workflows/cd.yml
# Deployment of Colmena Bookings:
# - push to main → CI → image (tag = commit) → staging
# - release published → CI → approval → same image with a version tag → production
name: CD
on:
push:
branches: [main]
release:
types: [published]
permissions:
contents: read
env:
# GitHub's container registry. The image name must be in lower case.
IMAGE: ghcr.io/${{ github.repository }}
jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yml
secrets: inherit
image:
name: Image
if: github.event_name == 'push'
needs: ci
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
packages: write # publish to ghcr.io with the GITHUB_TOKEN
steps:
- uses: actions/checkout@v7
- name: Download dist/ (the one built and checked by CI)
uses: actions/download-artifact@v8
with:
name: dist
path: dist
- uses: docker/setup-buildx-action@v4
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push the image
uses: docker/build-push-action@v7
with:
context: .
file: Dockerfile.release
push: true
tags: ${{ env.IMAGE }}:${{ github.sha }}
staging:
name: Deploy to staging
if: github.event_name == 'push'
needs: image
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: staging
url: https://staging.bookings.colmena.example
concurrency:
group: deploy-staging
steps:
- uses: actions/checkout@v7 # to have scripts/check-deployment.sh
- name: Request the deployment from the container platform
env:
DEPLOY_URL: ${{ vars.DEPLOY_URL }}
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: |
curl --fail-with-body -sS -X POST "$DEPLOY_URL" \
-H "Authorization: Bearer $DEPLOY_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"image\": \"$IMAGE:$GITHUB_SHA\"}"
- name: Post-deployment check
run: bash scripts/check-deployment.sh https://staging.bookings.colmena.example staging
production:
name: Deploy to production
if: github.event_name == 'release'
needs: ci
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
packages: write
environment:
name: production # with required reviewers: the job waits for approval
url: https://bookings.colmena.example
concurrency:
group: deploy-production
steps:
- uses: actions/checkout@v7
- uses: docker/setup-buildx-action@v4
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Tag the image tested on staging with the version
env:
VERSION: ${{ github.event.release.tag_name }}
run: docker buildx imagetools create --tag "$IMAGE:$VERSION" "$IMAGE:$GITHUB_SHA"
- name: Request the deployment from the container platform
env:
DEPLOY_URL: ${{ vars.DEPLOY_URL }}
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
VERSION: ${{ github.event.release.tag_name }}
run: |
curl --fail-with-body -sS -X POST "$DEPLOY_URL" \
-H "Authorization: Bearer $DEPLOY_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"image\": \"$IMAGE:$VERSION\"}"
- name: Post-deployment check
run: bash scripts/check-deployment.sh https://bookings.colmena.example production7.1 First, the full continuous integration
The ci job has no steps: it calls ci.yml (uses: ./.github/workflows/ci.yml), which runs in full inside this same run. secrets: inherit passes it the secrets (it needs them to upload the source maps). Everything else depends on it with needs: ci: if any check fails, nothing is deployed. And since artefacts belong to the run, the image job can download the dist/ that CI built.
Was everything not already checked on the PR? Yes, but on the expected merge with main as it was at that moment. If two PRs were merged one after the other, each was tested without the other. Checking again on the real main costs a few minutes and avoids surprises.
7.2 Staging: continuous deployment
Every merge into main:
imagebuilds the image withDockerfile.releasefrom CI'sdist/and publishes it to GitHub's container registry (ghcr.io) with the commit hash as its tag. The automaticGITHUB_TOKENis enough to authenticate, provided the job has thepackages: writepermission. In 10-02 we usedregistry.colmena.exampleas a generic name: GitHub's registry is the natural choice when continuous integration lives on GitHub.stagingasks the container platform to run that image on staging. Each platform has its own way of receiving this instruction (an API, a webhook, a command-line tool); Colmena's is fictitious and we assume it responds once the new container is up and running. Remember that the image carries no configuration: the platform has theENVIRONMENT=stagingandAPI_URLvariables defined for that service (10-02, section 10).- The check from 10-02 runs against the real URL. If it fails, the job turns red and the team finds out immediately. It is invoked with
bashso as not to depend on the file keeping its execute permission in git (something that is easily lost when working from Windows).
curl --fail-with-body makes an error response from the platform (4xx or 5xx) fail the step, showing the body of the response in the log.
7.3 Production: continuous delivery with approval
When the team has validated staging, it publishes a release on GitHub (for example, v1.4.0, created on the main commit that is on staging). That event triggers cd.yml again:
cichecks that commit again.productionuses theproductionenvironment, configured with required reviewers (section 8.3): the job pauses and GitHub notifies the reviewers, who see which version is about to be deployed and decide whether to approve or reject it.- Nothing is built:
docker buildx imagetools createadds thev1.4.0tag to the image that already exists with the commit's tag (the one deployed on staging). If the release was created on a commit that never went throughmain, that image does not exist, the step fails and nothing is deployed: a protection that comes for free. - The deployment and the check are the same as on staging, with the production URL and variables.
7.4 concurrency in deployments
Each deployment belongs to a group (deploy-staging, deploy-production). If a second deployment to the same environment arrives while another is in progress, it waits for it to finish (there is no cancel-in-progress: interrupting a deployment halfway through is worse than waiting). If several pile up waiting, only the last one is kept, which is the one that matters. It is the opposite of what we did in ci.yml, where an obsolete run is cancelled without a second thought.
- Secrets, variables and environments
8.1 Where each value lives
| Value | Type | Where it is configured | Used in |
|---|---|---|---|
GITHUB_TOKEN |
Automatic secret | GitHub creates it on every run; its permissions, with permissions: |
Publishing to ghcr.io |
NETLIFY_AUTH_TOKEN |
Secret | Repository → Settings → Secrets and variables → Actions | Previews |
NETLIFY_SITE_ID, STAGING_API_URL |
Variables (not secret) | Repository, same page, Variables tab | Previews |
SOURCEMAPS_TOKEN |
Secret | Repository | Uploading source maps |
DEPLOY_TOKEN |
Environment secret | Settings → Environments → staging / production |
Deployments |
DEPLOY_URL |
Environment variable | Settings → Environments → staging / production |
Deployments |
ENVIRONMENT, API_URL |
Container variables | The container platform, per service | config.json (10-02) |
Environment secrets and variables have the same name in staging and in production and different values: the job receives those of the environment it declares in environment. In addition, the production secrets are only available to jobs that pass that environment's protection rules, including the approval.
8.2 What must never go in the repository
- No secrets at all: tokens, passwords, private keys, credentials for the registry or the platform. Not in the code, not in the YAML files, not in a committed
.env, and not "temporarily" on a branch either: git history keeps it forever, and a secret that has been in a repository must be considered compromised and revoked. - The
.env*.localfiles, which.gitignorealready ignores. - The
.env.[mode]files with public values (the API URL, the environment name) can go in: you have known since 10-01 that they end up in the published JavaScript.
GitHub masks any literal appearance of a secret's value in the logs, but it is not infallible: a transformed secret (base64-encoded, split into pieces) is not recognised. Never print secrets, not even for debugging.
8.3 GitHub environments
Create two environments in Settings → Environments:
| Rule | staging |
production |
|---|---|---|
| Required reviewers | No | Yes: the people responsible for publishing (and enable "prevent self-review") |
| Allowed branches and tags | main |
v* tags and the main branch (for the rollback workflow in section 13) |
| Secrets and variables | The staging ones | The production ones |
As well as protecting, environments give visibility: the repository's main page shows which version is deployed in each one and the deployment history.
8.4 Good security practice in workflows
- Least privilege:
permissions: contents: readfor the whole workflow, and additional permissions (packages: write) only in the jobs that need them. - Do not interpolate external data into commands. Notice that the PR number, the release version or any text that someone else could control (a PR's title, a branch name) are passed to the commands as environment variables (
env:) and not by writing${{ ... }}insiderun:. An expression insiderun:is pasted into the script before it runs, and a malicious PR title could inject commands. - Pin third-party actions to the full hash of a commit (
uses: third-party/action@<hash>) rather than a tag, which its author could move. For GitHub's official actions and those from well-known providers, the major version (@v7) is a common compromise; Dependabot will keep them up to date (section 10). - Be wary of
pull_request_target: it is an event that runs with secrets even for PRs from forks. Used without understanding it, it lets a stranger's code run with your credentials. Colmena does not need it.
Warning. Secrets management, workflow permissions and environment configuration protect access to production. What is described here is a reasonable foundation, not an audit: before using it on a real project, have a security professional review the configuration of the repository, the environments and the deployment platform.
- Branch protection and required checks
A continuous integration workflow that can be ignored protects nothing. In Settings → Rules → Rulesets, create a ruleset for the main branch:
| Rule | What for |
|---|---|
| Require a pull request before merging, with at least one approval | Nobody pushes changes directly to main, and someone else reviews every change |
| Require status checks: Quality, Unit tests, Build, E2E tests (chrome), E2E tests (firefox) | Nothing can be merged with any check red or pending |
Require the branch to be up to date with main before merging |
The checks have run on the code that will really end up in main |
| Block force pushes and deletion of the branch | The history of main cannot be rewritten |
And another ruleset for the v* tags, which only allows the people responsible for publishing to create them: creating a tag is the first step towards production.
The names of the checks are the jobs' name: values (with the matrix, one per combination). If you rename a job, update the rule too, or the PR will be left waiting for a check that no longer exists. The preview is not required: it can fail because of a Netlify problem without there being anything wrong with the code.
- Dependency updates
Colmena depends on dozens of packages (and, through them, on hundreds). Keeping them up to date fixes security flaws and avoids huge version jumps every couple of years, but doing it by hand is tedious. Dependabot, built into GitHub, opens pull requests with the updates. Configure it in .github/dependabot.yml:
# .github/dependabot.yml
version: 2
updates:
# npm packages
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 5
groups:
# Minor and patch versions, grouped into a single PR per type
development:
dependency-type: development
update-types: [minor, patch]
production:
dependency-type: production
update-types: [minor, patch]
# Major versions arrive in individual PRs, so they can be reviewed one by one
# The actions used in .github/workflows
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
# The base images in Dockerfile and Dockerfile.release
- package-ecosystem: docker
directory: /
schedule:
interval: monthlyEach Dependabot PR goes through the same workflow as any other: lint, types, unit tests with coverage, build and E2E in two browsers. That is the real reason why continuous integration makes frequent updates viable: if a new version of Vue Router changes something Colmena uses, the tests will catch it on the PR, not the members in production. Some guidelines:
- Grouping minor and patch versions reduces the noise to one or two PRs a week.
- Review major versions one by one, reading their release notes: they are the ones that break things. The Vite build options we saw in 10-01 are a good example of what changes between major versions.
- Dependabot PRs have no preview (section 6): they receive their own set of secrets, and we have not given Dependabot the Netlify token. They do not need one: the tests are what matter in an update.
- Do not merge major versions automatically. Patch versions with all checks green can be merged in bulk after a quick look.
Renovate is a widely used alternative, more configurable (complex grouping, schedules, automatic merging by rules), which also works outside GitHub. Either of the two plays the same role: proposing changes that continuous integration validates.
- The
colmena-web workflow
colmena-web workflowcolmena-web lives in its own repository and follows the same scheme, adapted to a Nuxt application with a server (10-02, section 11). Its .github/workflows/ci-cd.yml, in summary:
# colmena-web/.github/workflows/ci-cd.yml (summary)
name: CI/CD colmena-web
on:
pull_request:
push:
branches: [main]
release:
types: [published]
permissions:
contents: read
jobs:
check:
name: Build and server check
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci # also runs the postinstall (nuxt prepare)
- run: npm run build # nuxt build → .output/
- name: Start the built server and check it
run: |
node .output/server/index.mjs &
npx --yes wait-on http://localhost:3000 --timeout 30000
curl -fsS http://localhost:3000/rooms > /dev/null
curl -fsS http://localhost:3000/api/rooms | grep -q nectar
test "$(curl -s -o /dev/null -w '%{http_code}' http://localhost:3000/rooms/basement)" = 404
# image, staging and production: as in Colmena Bookings' cd.yml, with the
# Dockerfile from 10-02 (Node server), the ghcr.io/<organisation>/colmena-web image,
# each environment's NUXT_PUBLIC_BOOKINGS_URL variables on the platform,
# and a post-deployment check on /, /rooms and /api/rooms.The differences from Colmena Bookings:
- The key check is starting the server: an error in a
server/apiroute or in server-side rendering does not show up when building, but when serving the first request. The threecurlcalls check the SSR, the API and that a non-existent room returns a real 404 (09-06). - The image is built with the multi-stage
Dockerfilefrom 10-02:.output/needs the server dependencies that Nitro selects at build time, and it is simpler to let theDockerfiledo everything. - The runtime configuration is native:
NUXT_PUBLIC_BOOKINGS_URLpoints tohttps://staging.bookings.colmena.exampleon staging and tohttps://bookings.colmena.examplein production, so that each environment's public website links to the bookings application in the same environment. - If it were published on a platform with a preset (Netlify, Vercel...), its GitHub integration would build and deploy on its own, previews included, and the GitHub Actions workflow would be reduced to the checks.
- Time and costs
GitHub Actions minutes are free for public repositories; for private ones, each plan includes a monthly allowance and any excess is charged (check the current terms of your plan). But, beyond money, time matters: a 30-minute workflow makes people stop waiting for the result, pile up changes and lose the advantage of frequent integration. The levers:
| Technique | How it is applied in Colmena | Effect |
|---|---|---|
| Parallelise | quality, unit-tests, build and the two E2E jobs with no dependencies between them |
Total time ≈ that of the slowest job (the E2E tests), not the sum |
| Caching | cache: npm in setup-node; npm and Cypress binary caching in its action |
Installation goes from minutes to seconds |
| Cancel what is obsolete | concurrency with cancel-in-progress in ci.yml |
Ten pushes in a row to a PR do not consume ten complete runs |
| Do not install what is not used | CYPRESS_INSTALL_BINARY: 0 outside the E2E tests |
Hundreds of megabytes less per job |
| Time limits | timeout-minutes on every job |
A hung process does not consume hours |
| Artefact retention | retention-days: 7 |
Less storage used |
| Measure before expanding | The browser matrix doubles the cost of the E2E tests | Expand it (Edge, another Node version) only if it provides new information |
| Build once | dist/ as an artefact; the image promoted to production, not rebuilt |
Less time and the guarantee of publishing what was tested |
A common temptation is to skip the workflow when only documentation changes, with paths-ignore. Be careful: if the workflow does not run, the required checks from section 9 stay "pending" forever and the PR cannot be merged. If you need it, filter inside the jobs (with an action that detects the changed files) rather than on the event.
- Monitoring and rollback after deployment
13.1 What to monitor
A green deployment means that the checks have passed, not that everything is fine. After each deployment to production, the team keeps an eye on:
| Signal | Source | What it indicates |
|---|---|---|
| Post-deployment check | scripts/check-deployment.sh, in the workflow itself |
The server configuration, caching, headers and config.json are correct |
| Errors per version | Monitoring service (events with environment and version, source maps uploaded) |
A rise in errors right after publishing v1.4.0 points to that version |
| Real-world performance | Core Web Vitals from real users (09-07) | A version that has made loading or responsiveness worse |
| Availability | A periodic check from outside | The site responds, even when nobody is deploying |
| Product signals | Bookings created per hour in the API | A failure that produces no technical errors but prevents people from booking |
For availability, an external monitoring service is the right tool. As a simple complement, the script itself can be run periodically:
# .github/workflows/monitoring.yml
name: Monitoring
on:
schedule:
- cron: '*/30 * * * *' # every 30 minutes (UTC)
workflow_dispatch: # and on demand, with a button
permissions:
contents: read
jobs:
production:
name: Check production
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
- run: bash scripts/check-deployment.sh https://bookings.colmena.example productionIf it fails, GitHub notifies whoever set up the workflow. Bear its limits in mind: scheduled runs can be delayed when demand is high, and GitHub disables them in public repositories after a period without activity. It does not replace a monitoring service.
13.2 Rolling back at the push of a button
In 10-02, rolling back meant running the previous version's image again, which is still in the registry with its tag. Automate it with a workflow that is launched by hand, .github/workflows/rollback.yml:
# .github/workflows/rollback.yml
name: Roll back production
on:
workflow_dispatch:
inputs:
version:
description: 'Version to restore (tag of an earlier release, for example v1.3.2)'
required: true
type: string
permissions:
contents: read
env:
IMAGE: ghcr.io/${{ github.repository }}
jobs:
rollback:
name: Roll back production
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: production
url: https://bookings.colmena.example
concurrency:
group: deploy-production
steps:
- uses: actions/checkout@v7
- name: Validate the version
env:
VERSION: ${{ inputs.version }}
run: |
[[ "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "Invalid version: $VERSION"; exit 1; }
- name: Request the deployment of the previous version
env:
DEPLOY_URL: ${{ vars.DEPLOY_URL }}
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
VERSION: ${{ inputs.version }}
run: |
curl --fail-with-body -sS -X POST "$DEPLOY_URL" \
-H "Authorization: Bearer $DEPLOY_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"image\": \"$IMAGE:$VERSION\"}"
- name: Post-deployment check
run: bash scripts/check-deployment.sh https://bookings.colmena.example productionworkflow_dispatchwithinputsshows a "Run workflow" button in the Actions tab with a field for the version.- The validation with a regular expression rejects any value that is not a version tag. Together with the use of
env:instead of${{ }}insiderun:(section 8.4), it prevents the field from being used to inject commands. - The
productionenvironment requires the same approval as a normal deployment: rolling back also means touching production. If it is urgent, the reviewers can approve within seconds from their phones. - The same
concurrencygroup as the deployment to production: a rollback never runs at the same time as a deployment. - Nothing is built: the
v1.3.2image has existed since that version was published. That is why in 10-02 we insisted on tagging every image and keeping them.
After rolling back, the fix is made calmly on a branch, goes through the PR, continuous integration and staging, and is published as v1.4.1. Remember what happens to users who are online during the rollback: the automatic reload from 09-05 and 10-01 takes them to the restored version.
- Try it
To follow these steps you need Colmena Bookings in a GitHub repository (it can be private). The deployment steps require a real platform; if you do not have one, the staging, production and preview jobs will fail at the deployment step, and you can comment them out to practise the rest.
- Preparation. Add the
lint:ciandformat:checkscripts, the coverage thresholds,VITE_VERSIONinlogError,Dockerfile.releasewith its.dockerignoreand the.github/files. Runnpm run lint:ci,npm run format:check,npm run type-checkandnpm run test:coveragelocally: if something fails here, it will fail in CI. - The first run. Create a branch, make a commit and open a PR. In the PR's Checks tab you will see the jobs appear: "Quality", "Unit tests", "Build" and the two "E2E tests" in parallel. Open one and go through the log for each step.
- The cache. Make another commit on the same branch. In the
setup-nodestep in the log, look for the message saying that the cache has been restored, and compare the duration of "Install dependencies" with the first run. - Cancellation. Make two commits a few seconds apart: the first run shows up as cancelled.
- A quality failure. Declare a variable that is not used in a component (
const unused = 1), or leave a file unformatted: "Quality" turns red and the rest stay green. - An E2E failure. Temporarily change a text that
booking.cy.jschecks (as in step 3 of the "Try it" in 08-04). Both E2E jobs fail; download thecypress-chromeartefact from the run's page and open the screenshot and the video. Restore it. - Coverage. Raise the
linesthreshold above your real coverage: "Unit tests" fails with a message about the threshold. Download thecoverageartefact and openindex.html. Restore it. - Protection. Set up the ruleset from section 9 and try to merge a PR with a red check: the button is blocked.
- Preview. With Netlify configured, the PR shows the button for the
previewenvironment; open it: the badge says "Environment: preview-N". - The road to production. Merge the PR: in Actions, the "CD" workflow runs the full CI, the image and staging. Then create a
v0.1.0release: the production job is left "Waiting", with a button for a reviewer to approve it.
Common Mistakes and Tips
- Running
eslint --fixorprettier --writein CI. They fix things on a machine that gets destroyed, and the check passes with the unfixed code. - Using
npm installinstead ofnpm ci. It may install versions different from those in the lockfile, and CI stops reproducing what the team uses. - A different version of Node in CI. Use
node-version-file: .nvmrcin every job and the same version in theDockerfile. - Rebuilding for each environment. Build once, save the artefact or the image and promote it.
- Writing
${{ github.event.pull_request.title }}(or any external data) insiderun:. Pass it throughenv:. - Giving broad permissions to the whole workflow.
contents: readby default and additional permissions only where needed. - Storing secrets in (non-secret) variables or printing them for debugging.
- Renaming a job without updating the required checks: PRs are left blocked, waiting for a check that no longer exists.
- Ignoring a flaky test because "it fails sometimes". A test that fails at random teaches the team to ignore red. Fix it or delete it; in 08-04 we saw how to make the E2E tests deterministic.
- Deploying without a follow-up check. A deployment that nobody verifies can leave production broken for hours.
- Tip: when a workflow fails and you do not understand why, run exactly the same commands as its log locally, in the same order and from a clean copy of the repository (
git cloneinto another folder): most differences show up there.
Exercises
Exercise 1. Netlify previews are piling up. Write a .github/workflows/clean-up-preview.yml workflow that runs when a PR is closed and writes to the log which preview should be deleted (the pr-N alias), without deleting anything yet (the way of deleting depends on the platform). Make sure the PR number is not interpolated directly into the command.
Exercise 2. The team wants the post-deployment check on staging to include a very short Cypress test against the real URL: open the home page and check that the application's name and the "Environment: staging" badge appear. Write the cypress/e2e/smoke.cy.js test and the step that runs it in the staging job of cd.yml. Why can the full booking.cy.js not be run there?
Exercise 3. A colleague proposes simplifying cd.yml as follows: in the production job, instead of retagging the image, download the dist/ artefact from the release's CI and build a new image with the version tag. Explain what is gained, what is lost and which guarantee disappears.
Solutions
Solution 1.
# .github/workflows/clean-up-preview.yml
name: Clean up preview
on:
pull_request:
types: [closed] # when the PR is closed, whether merged or not
permissions:
contents: read
jobs:
clean-up:
name: Clean up preview
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Report the preview that should be deleted
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
MERGED: ${{ github.event.pull_request.merged }}
run: |
echo "PR #$PR_NUMBER has been closed (merged: $MERGED)."
echo "Preview to delete: alias pr-$PR_NUMBER on the Netlify site."types: [closed]: by default,pull_requestreacts toopened,synchronizeandreopened;closedhas to be requested. It fires whether the PR is merged or discarded (mergedtells them apart).PR_NUMBERviaenv:: although the number is an integer that GitHub generates, the habit of never interpolating event data into scripts avoids mistakes when the pattern is copied for other fields (such as the title).- The same fork condition as the preview job: if no preview was created, there is nothing to clean up.
Solution 2.
// cypress/e2e/smoke.cy.js
// Smoke test against a deployed environment: read-only, without signing in
describe('Smoke: the deployed environment starts up', () => {
it('shows the application and its environment', () => {
cy.visit('/')
cy.contains('h1', 'Colmena Bookings')
cy.get('[data-test="environment-badge"]').should('contain', Cypress.env('ENVIRONMENT'))
})
}) # In the staging job of cd.yml, after the check with curl
- uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
- name: Smoke test with Cypress
uses: cypress-io/github-action@v7
with:
spec: cypress/e2e/smoke.cy.js
browser: chrome
config: baseUrl=https://staging.bookings.colmena.example
env: ENVIRONMENT=staging- No
buildorstart: the application is already deployed;baseUrlpoints to staging instead oflocalhost:4173. env: ENVIRONMENT=stagingis read in the test withCypress.env('ENVIRONMENT'), so the same test works for any environment.- The title check: adjust the selector to the real header in your
AppHeader(in the previous lessons, the "Colmena Bookings" title comes fromapp.title, 07-03).
booking.cy.js cannot be run against staging for two reasons. First: it depends on the stable simulation (VITE_STABLE_SIMULATION), which only exists in the e2e build; the deployed image is the production one, with random delays and failures, and the test would be flaky. Second: it modifies data (it creates and cancels a booking); against a real staging API it would leave traces behind and could interfere with whatever the team is testing. A smoke test must be read-only.
Solution 3.
- What is gained is apparent simplicity:
setup-buildxandimagetoolsare no longer needed, and the production job looks like the staging one. - What is lost is time (one more image build) and, above all, identity: the production image is no longer the one that ran on staging. Even if it comes from the same commit, it is a different build: a change to the
nginx:stable-alpinebase image published in between, a difference in thedist/from the new CI run... any difference would reach production without having gone through staging. - The guarantee that disappears is "what gets published is exactly what was tested". With retagging, the production image has the same digest (the fingerprint of its content) as the staging one, and the registry can prove it. In addition, the free protection from section 7.3 is lost: with a new build, a release created on a commit that never went through staging would be deployed without any problem.
Conclusion
Continuous integration and deployment turn publishing into an automated, repeatable and auditable process. With GitHub Actions you have built for Colmena Bookings a continuous integration workflow (ci.yml) that, on every pull request, checks in parallel the quality (lint, formatting and types without modifying anything), the unit tests with coverage thresholds, the build (saved as an artefact, with the maps uploaded and removed) and the E2E tests with Cypress's official action in two browsers, on the e2e build from 08-04, with screenshots and videos when they fail; previews of every PR on Netlify with their own config.json; and a deployment workflow (cd.yml) that reuses continuous integration, publishes the image to ghcr.io, deploys automatically to staging on every merge and promotes that same image to production when a release is published, after manual approval in a protected environment. Secrets live in GitHub and on the platform, never in the repository; the rules on the main branch prevent merging with red checks; Dependabot proposes updates that go through the same filter; colmena-web follows the same scheme with its Nuxt server; caching, parallelism and concurrency keep the workflow fast and cheap; and monitoring, the check after each deployment and a rollback button close the loop.
This lesson brings the technical journey of Colmena Bookings to an end. It began in 01-03 as a freshly created Vite project with a free-rooms counter in App.vue, and you have watched it grow module by module: templates, reactivity and forms; a tree of components that communicate through props, events, slots and provide/inject; a router with nested routes, parameters in the URL and guards; shared state in Pinia (after getting to know Vuex); directives and plugins, both your own and third-party ones; an interface in three languages; unit, component, store and end-to-end tests; reusable composables, TypeScript, render functions, transitions, error handling and performance optimisation; a public website with server-side rendering in Nuxt; and, in this module, an optimised build, a container deployment with caching and security headers, and an automated, monitored path from every change all the way to production. It is the complete life cycle of a professional Vue application. The next step is to put it into practice on your own, from start to finish, in new projects that share no code with Colmena and in which every decision will be yours: the last module of the course begins with Project 1: To-Do List Application.
Vue.js Course
Module 1: Introduction to Vue.js
- What Is Vue.js?
- Setting Up the Development Environment
- Creating Your First Vue Application
- Understanding the Vue Instance: Application, Components and Lifecycle
- Options API and Composition API: Two Ways to Write Components
Module 2: Vue.js Basics
- Template Syntax
- Reactivity: ref and reactive
- Data Binding
- Event Handling
- Computed Properties and Watchers
- Class and Style Bindings
- Conditional Rendering
- List Rendering
- Forms with v-model
Module 3: Vue.js Components
- Introduction to Components
- Props and Custom Events
- v-model on Your Own Components
- Slots
- Template Refs and Fallthrough Attributes
- Dynamic and Async Components
- Component Communication
Module 4: Vue Router
- Introduction to Vue Router
- Setting Up Vue Router
- Dynamic Routes
- Nested Routes
- Programmatic Navigation and Query Parameters
- Navigation Guards
Module 5: State Management with Vuex and Pinia
- Introduction to Vuex
- State, Getters, Mutations and Actions
- Vuex Modules
- Using Vuex in Components
- Advanced Vuex Patterns
- Pinia: The Recommended State Management for Vue 3
- Migrating from Vuex to Pinia
Module 6: Vue.js Directives
Module 7: Vue.js Plugins
Module 8: Testing in Vue.js
- Unit Testing with Vue Test Utils and Vitest
- Mocking Dependencies
- Testing Composables and Stores
- End-to-End Testing with Cypress
Module 9: Advanced Vue.js Concepts
- The Vue 3 Composition API in Depth: Composables and Logic Reuse
- Vue with TypeScript
- Render Functions and JSX
- Transitions and Animations
- Teleport, Suspense and Error Handling
- Server-Side Rendering (SSR) with Nuxt
- Performance Optimization
