-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 913 Bytes
/
post_merge_deploy.yml
File metadata and controls
40 lines (31 loc) · 913 Bytes
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
name: Post Merge Deploy (Production)
on:
pull_request:
types:
- closed
workflow_dispatch:
jobs:
build-and-deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
env:
DBT_USER: ${{ secrets.DBT_USER }}
DBT_PASSWORD: ${{ secrets.DBT_PASSWORD }}
DATABASE_HOST: ${{ secrets.DATABASE_HOST }}
DATABASE_PORT: ${{ secrets.DATABASE_PORT }}
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dbt
run: pip install dbt-core==1.8.7 dbt-postgres==1.8.2
- name: Install dbt Packages
run: dbt deps
- name: Deploy & Test Models (Prod)
run: >
dbt build
--profiles-dir _project_docs/automation
--target prod