-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (62 loc) · 2.16 KB
/
deploy-cdk.yml
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
68
69
70
71
72
73
74
name: Deploy
on:
push:
branches:
- main
jobs:
deploy_cdk:
runs-on: ubuntu-latest
steps:
- name: Install pip
run: |
sudo apt install python3-pip
python -m pip install --upgrade pip setuptools wheel
- name: Install AWS CLI
run: |
sudo apt-get update
sudo apt-get install -y awscli
- name: Install CDK
run: npm install -g aws-cdk
- name: Checkout code
uses: actions/checkout@v3
- name: Install Python Packages
run: pip install -r ${{ github.workspace }}/requirements.txt
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '14.x'
- name: Install dependencies
run: |
npm install -g [email protected]
cdk --version
- name: Deploy to AWS
run: |
cdk synth
cdk deploy --require-approval never
env:
AWS_ACCOUNT_ID: 632753217422
AWS_REGION: ap-southeast-2
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
BUCKET_NAME: pedestrian-analysis-working-bucket
CITY_OF_MELBOURNE_API_KEY: ${{ secrets.CITY_OF_MELBOURNE_API_KEY }}
- name: Run Glue Jobs
run: python ${{ github.workspace }}/run-glue.py
env:
AWS_ACCOUNT_ID: 632753217422
AWS_REGION: ap-southeast-2
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
BUCKET_NAME: pedestrian-analysis-working-bucket
CITY_OF_MELBOURNE_API_KEY: ${{ secrets.CITY_OF_MELBOURNE_API_KEY }}
- name: Run DBT tests
run: |
dbt test \
--project-dir ${{ github.workspace }}/pa_dbt \
--profiles-dir ${{ github.workspace }}/pa_dbt/profiles \
--profile pedestrian_analysis_profile
env:
AWS_ACCOUNT_ID: 632753217422
AWS_REGION: ap-southeast-2
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}