Skip to content

Commit

Permalink
Merge pull request #73 from OHDSI/lawrenceadams-add-docs-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrenceadams authored Oct 5, 2024
2 parents 7cc3567 + 9178664 commit b675383
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
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
- 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

0 comments on commit b675383

Please sign in to comment.