Skip to content

Commit 36c360c

Browse files
authored
Merge pull request #2 from rfdearborn/rfdearborn/initialize
lint + clarification
2 parents 544f064 + 30bfd04 commit 36c360c

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
# dbt-docs-to-notion
2+
23
A Github action for exporting dbt model docs to a Notion database, where they can be conveniently consumed (especially by casual users in your org).
34

45
## Output
6+
57
A Notion database, within a page of your choosing, with records like this:
68
![dbt docs to notion output](https://i.imgur.com/Y1EWj9l.png)
79

810
## Usage
11+
912
### Prerequisites
13+
1014
In advance of using this action, you should:
15+
1116
1. [Create a new integration within your Notion workspace](https://www.notion.so/my-integrations)
1217
2. Have your Notion integration token and a working dbt `profiles.yml` accessible to your repo (I'd recommend using [Github's repository secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets); see example workflow below).
18+
1319
### Inputs
20+
1421
- `dbt-package`: dbt-bigquery, dbt-postgres, dbt-bigquery==1.0.0, etc. (**required**)
1522
- `dbt-profile-path`: where profile.yml lives (default: `./`)
1623
- `dbt-target`: profile target to use for dbt docs generation (**required**)
@@ -20,14 +27,18 @@ In advance of using this action, you should:
2027
- `notion-token`: Notion token API for integration to use (pass using secrets) (**required**)
2128

2229
### Post-initialization Touchups
30+
2331
Unfortunately, Notion's API doesn't allow for setting the order of properties or records in a database. Thus, after creating your database, you'll probably want to do some re-arranging (I'd recommend adding a table view to your database's parent page).
2432

2533
### Example workflow
26-
```
34+
35+
```yaml
2736
name: dbt Docs to Notion
2837

2938
on:
30-
- pull_request
39+
push:
40+
branches:
41+
- master
3142

3243
jobs:
3344
dbt-docs-to-notion:
@@ -47,6 +58,6 @@ jobs:
4758
dbt-target: 'github_actions'
4859
model-records-to-write: "all"
4960
notion-database-name: 'dbt Models'
50-
notion-parent-id: 'your-page-id-here'
61+
notion-parent-id: '604ece5b9dca4cdda449abeabef759e8'
5162
notion-token: '${{ secrets.DBT_DOCS_TO_NOTION_TOKEN }}'
5263
```

0 commit comments

Comments
 (0)