-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (62 loc) · 1.91 KB
/
deploy.yaml
File metadata and controls
67 lines (62 loc) · 1.91 KB
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
name: deploy
on:
# schedule:
# - cron: '*/10 * * * *'
workflow_dispatch:
branches:
- master
push:
branches:
- master
concurrency:
group: "scheduled"
cancel-in-progress: true
jobs:
staging:
name: Deploy to Staging
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: '3.11'
cache: 'pip'
- run: pip install -r requirements.txt
- run: dbt --debug run
env:
DBT_HOST: ${{ secrets.STAGING_HOST }}
DBT_PORT: ${{ secrets.STAGING_PORT }}
DBT_USER: ${{ secrets.STAGING_USER }}
DBT_PASSWORD: ${{ secrets.STAGING_PASSWORD }}
DBT_SECURE: ${{ secrets.STAGING_SECURE }}
production:
name: Deploy to Production
needs: staging
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: '3.11'
cache: 'pip'
- run: pip install -r requirements.txt
- run: dbt --debug run
env:
DBT_HOST: ${{ secrets.PRODUCTION_HOST }}
DBT_PORT: ${{ secrets.PRODUCTION_PORT }}
DBT_USER: ${{ secrets.PRODUCTION_USER }}
DBT_PASSWORD: ${{ secrets.PRODUCTION_PASSWORD }}
DBT_SECURE: ${{ secrets.PRODUCTION_SECURE }}
notify:
name: Discord Notification
runs-on: ubuntu-latest
needs:
- staging
- production
if: failure() || cancelled()
steps:
- name: Notify
uses: nobrayner/discord-webhook@1766a33bf571acdcc0678f00da4fb83aad01ebc7 # v1
with:
github-token: ${{ secrets.github_token }}
discord-webhook: ${{ secrets.DISCORD_WEBHOOK }}