Deployment & CI/CD Setup
Once you’ve generated your static HTML with Colibri, you’ll likely want to make it available online for your team to view. There are multiple approaches to do this.
GitHub/GitLab Pages, is relatively straightforward to set up.
Another options is to host it on a bucket and using a CDN (e.g. S3 + CloudFront ) to serve the static files.
GitHub Pages Example
With GitHub Actions you can automate deployment on every push to your main
branch.
Here’s the general flow:
- Install dependencies & set up Python
Use uv or pip to install Colibri. - Compile manifest & generate docs
Run your dbt commands, then build Colibri’s static HTML. - Deploy to GitHub Pages
Thedist/
folder is uploaded as an artifact and published to Pages.
Make sure to turn on GitHub Pages for your repository.
You need an Enterprise plan to use pages privately.
You can use this workflow file as a starting point:
.github/workflows/deploy.yml
name: dbt Colibri Example
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
run: python3 -m pip install uv
- name: Install dependencies
run: uv pip install -r requirements.txt --system
- name: Initialize dbt
run: |
dbt deps
dbt compile # Note that dbt run / dbt build also generates the manifest incl. compiled sql code
dbt docs generate
- name: Run Colibri
run: colibri generate
- name: Prepare artifact
run: |
# Ensure that the index.html is generated in the output dir
if [ -f dist/index.html ]; then
echo "Preparing artifact for GitHub Pages..."
else
echo "Error: dist/index.html not found!"
exit 1
fi
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist # upload entire dist folder
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Last updated on