-
Notifications
You must be signed in to change notification settings - Fork 6
69 lines (66 loc) · 2.01 KB
/
generate-docs.yml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Generate DBT Docs
on:
push:
branches:
- main
paths:
- macros/**
- models/**
- seeds/**
- snapshots/**
- tests/**
- dbt_project.yml
jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: 'requirements/duckdb.txt'
- name: Install dependencies
run: |
pip install -r requirements/duckdb.txt
- name: Setup profile
run: |
cat << EOF > profiles.yml
synthea_omop_etl:
outputs:
dev:
type: duckdb
path: synthea_omop_etl.duckdb
schema: dbt_synthea_dev
target: dev
target: dev
EOF
- run: dbt deps
- run: dbt seed
- run: dbt run
- run: dbt test
- name: Generate Docs and prepare for upload
run: |
dbt docs generate
mkdir ./payload
mv ./target/index.html ./payload
mv ./target/manifest.json ./payload
mv ./target/catalog.json ./payload
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./payload
deploy:
needs: update-docs
permissions:
pages: write # to deploy to Pages
id-token: write # required for OIDC token fetch
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4