-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (40 loc) · 1.22 KB
/
deploy-dbt.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
name: Deploy dbt
on:
push: { branches: ["main"] }
workflow_dispatch:
env:
DBT_PROJECT_DIR: ${{ vars.DBT_PROJECT_DIR }}
DBT_PROFILES_DIR: ${{ vars.DBT_PROFILES_DIR }}
permissions:
contents: write
jobs:
dbt-build:
name: Build dbt 🎉
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: 📦 Set up Poetry
run: pipx install poetry==1.8.2
- name: Python setup 🐍
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dbt ⬇️
run: poetry install
- name: Create mock database 🤡
run: >
poetry run python -c
"import duckdb; con = duckdb.connect('$GITHUB_WORKSPACE/billiam_database/billiam.duckdb'); con.close()"
- name: Install dbt dependencies ➕
run: |
poetry run dbt clean --no-clean-project-files-only
poetry run dbt deps
poetry run dbt run-operation set_ci_environment
- name: Compile dbt docs 📝
run: poetry run dbt docs generate
- name: Deploy dbt docs 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: billiam_database/target