-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (41 loc) · 1.08 KB
/
docs.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
---
name: Deploy docs
on:
pull_request:
types: [closed]
env:
DBT_SA: ${{ secrets.DBT_SA }}
jobs:
docs:
if: |
github.event.pull_request.merged == true
&& github.event.pull_request.base.ref == 'main'
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up poetry
run: pipx install poetry
- name: Set up python
uses: actions/setup-python@v4
with:
cache: poetry
python-version: '3.9'
- name: Install requirements
run: poetry install --with=dev
- name: Setup credentials
run: |
echo $DBT_SA | base64 --decode > dbt-sa.json
poetry run python .github/workflows/scripts/modify_profiles.py
- name: Generate docs
run: |
poetry run dbt docs generate --profiles-dir .
- name: Delete credentials
run: |
rm dbt-sa.json
- name: Deploy docs
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: target