Skip to content

feat: Deploy dbt docs to Vercel #6

feat: Deploy dbt docs to Vercel

feat: Deploy dbt docs to Vercel #6

name: Deploy dbt docs
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
generate-docs:
runs-on: ubuntu-latest
timeout-minutes: 30
services:
postgres:
image: postgres:11
env:
POSTGRES_PASSWORD: pass
POSTGRES_USER: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dbt-postgres
run: pip install dbt-postgres
- name: Generate the docs
run: make gen-site
env:
CQ_DSN: postgresql://postgres:pass@localhost:5432/postgres
- uses: actions/checkout@v2
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --no-wait --token=${{ secrets.VERCEL_TOKEN }}