-
Notifications
You must be signed in to change notification settings - Fork 0
deployment
This page covers how the site is built, deployed, and published. The repository uses GitHub Pages for hosting, GitHub Actions for CI/CD, and Docker for local development and image distribution.
File: .github/workflows/deploy.yml
The main deployment workflow builds the site and pushes the output to the gh-pages branch.
Triggers:
| Event | Branches | Condition |
|---|---|---|
push |
master, main
|
Changes to content files (assets, sass, scripts, bib, html, js, liquid, markdown, yml, Gemfile) |
pull_request |
master, main
|
Same file changes (build only, no deploy) |
workflow_dispatch |
— | Manual trigger |
Build steps:
- Checkout — Checks out the repository.
- Setup Ruby — Installs Ruby 3.3.5 with Bundler caching.
- Setup Python — Installs Python 3.13 with pip caching.
-
Update
_config.yml— Setsgiscus.repoto the current GitHub repository name. -
Install and Build — Installs ImageMagick, upgrades nbconvert, runs
bundle exec jekyll buildwithJEKYLL_ENV=production. -
Purge unused CSS — Runs PurgeCSS with
purgecss.config.jsto remove unused CSS. -
Deploy — Uses
JamesIves/github-pages-deploy-action@v4to push_site/to thegh-pagesbranch (skipped for pull requests).
Permissions: contents: write (required to push to gh-pages).
File: .github/workflows/deploy-docker-tag.yml
Publishes a versioned Docker image when a Git tag matching v* is pushed.
Triggers: Push of tags matching v*, when Docker-related files change (Dockerfile, Gemfile, Gemfile.lock, package.json, package-lock.json, bin/entry_point.sh).
Build steps:
- Checkout — Checks out the repository.
- Set up QEMU — Enables multi-platform builds.
- Set up Buildx — Configures Docker Buildx for advanced builds.
- Docker meta — Extracts tag metadata for image labels and tags.
-
Login — Authenticates to Docker Hub using
DOCKER_USERNAMEandDOCKER_PASSWORDsecrets. -
Build and push — Builds for
linux/amd64andlinux/arm64/v8platforms and pushes toamirpourmand/al-folio.
Image: amirpourmand/al-folio:{version} (e.g., amirpourmand/al-folio:v0.16.3).
File: .github/workflows/deploy-image.yml
Publishes the latest Docker image on every push to master/main that changes Docker-related files.
Condition: Only runs for the alshedivat repository owner (upstream).
Image: amirpourmand/al-folio:latest
File: .github/workflows/docker-slim.yml
Creates a size-optimized "slim" variant of the Docker image using DockerSlim.
Triggers:
| Event | Condition |
|---|---|
push to master/main
|
When docker-slim.yml changes |
workflow_run |
After the "Docker Image CI" workflow succeeds |
workflow_dispatch |
Manual trigger |
Build steps:
- Checks out the repository.
- Logs in to Docker Hub.
- Updates
docker-compose.ymlto use the workspace path. - Runs DockerSlim to create a minimized image tagged as
amirpourmand/al-folio:slim. - Pushes the slim image to Docker Hub.
Condition: Only runs for the alshedivat repository owner and when the parent Docker Image CI workflow succeeded.
File: Dockerfile
Based on ruby:slim, the image includes:
- System packages: build-essential, curl, git, ImageMagick, inotify-tools, locales, Node.js, procps, python3-pip, zlib1g-dev.
- Python packages: nbconvert (for Jupyter notebook conversion).
-
Ruby packages: Jekyll and all gems from
Gemfile. - Exposed port: 8080.
-
Entry point:
/tmp/entry_point.sh.
Environment variables set in the image:
| Variable | Value | Purpose |
|---|---|---|
EXECJS_RUNTIME |
Node |
JavaScript runtime for ExecJS. |
JEKYLL_ENV |
production |
Jekyll environment. |
LANG |
en_US.UTF-8 |
System locale. |
LANGUAGE |
en_US:en |
Language preference. |
LC_ALL |
en_US.UTF-8 |
Locale override. |
File: docker-compose.yml
| Setting | Value | Description |
|---|---|---|
image |
amirpourmand/al-folio:v0.16.3 |
Pre-built image from Docker Hub. |
build |
. |
Falls back to building from Dockerfile if image pull fails. |
ports |
8080:8080, 35729:35729
|
Jekyll server (8080) and LiveReload (35729). |
volumes |
.:/srv/jekyll |
Mounts the repository into the container for live editing. |
environment |
JEKYLL_ENV=development |
Enables development mode features. |
File: docker-compose-slim.yml
Same as docker-compose.yml but uses the amirpourmand/al-folio:slim image (smaller size, no build fallback).
File: bin/entry_point.sh
The container entry point does the following:
-
Manages
Gemfile.lock— If tracked by Git, restores it; if untracked, removes it to avoid conflicts. -
Starts Jekyll — Runs
bundle exec jekyll servewith:-
--watch— Rebuilds on file changes. -
--port=8080— Serves on port 8080. -
--host=0.0.0.0— Binds to all interfaces. -
--livereload— Enables LiveReload on port 35729. -
--verbose --trace— Detailed output for debugging. -
--force_polling— Uses polling instead of inotify (needed for mounted volumes).
-
-
Watches
_config.yml— Usesinotifywaitto detect changes to_config.ymland restarts Jekyll when it changes (since config changes require a full restart).
File: bin/deploy
A shell script for manually deploying to GitHub Pages without GitHub Actions.
Usage:
bin/deploy [-s SRC_BRANCH] [-d DEPLOY_BRANCH] [--verbose] [--no-push]| Flag | Default | Description |
|---|---|---|
-s, --src
|
main |
Source branch to build from. |
-d, --deploy
|
gh-pages |
Target branch for deployment. |
--verbose |
— | Enable shell tracing (set -x). |
--no-push |
— | Build but don't push to remote. |
Process:
- Validates no uncommitted or untracked changes exist.
- Checks out the source branch.
- Creates a fresh
gh-pagesbranch (deletes existing one). - Runs
JEKYLL_ENV=production bundle exec jekyll build. - Runs PurgeCSS.
- Moves
_site/contents to the repo root, removing everything else. - Creates a
.nojekyllfile (bypasses GitHub Pages' built-in Jekyll processing). - Commits and force-pushes to the deploy branch.
- Switches back to the source branch.
Additional workflows run alongside deployment:
| Workflow | File | Trigger | Purpose |
|---|---|---|---|
| Update citations | update-citations.yml |
Mon/Wed/Fri schedule + manual | Fetches Google Scholar citation counts and updates _data/citations.yml. |
| Render CV | render-cv.yml |
Push to _data/cv.yml or RenderCV config + manual |
Renders the CV from YAML to PDF using RenderCV. |
| Prettier | prettier.yml |
Push/PR | Formats code with Prettier. |
| CodeQL | codeql.yml |
Push/PR + schedule | Security analysis of the codebase. |
| Broken links |
broken-links.yml / broken-links-site.yml
|
Schedule + manual | Checks for broken internal and external links. |
| Lighthouse | lighthouse-badger.yml |
Schedule + manual | Runs Lighthouse performance/accessibility audits. |
| Axe | axe.yml |
Schedule + manual | Accessibility testing with axe-core. |
docker compose pull && docker compose up
# Site at http://localhost:8080, LiveReload at http://localhost:35729JEKYLL_ENV=production bundle exec jekyll build
purgecss -c purgecss.config.js
# Output in _site/bin/deploy # Deploy main → gh-pages
bin/deploy --no-push # Build only, don't push
bin/deploy -s develop -d staging # Custom branches- Overview — Repository structure and key facts
-
Configuration — All
_config.ymlsettings - Dependencies — Ruby gems and Node.js packages