-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (71 loc) · 2.57 KB
/
build_deploy.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Python CI
on:
push:
branches:
- development
- base
pull_request:
branches:
- development
jobs:
build:
if: github.ref != 'refs/heads/base' || github.ref != 'refs/heads/development'
runs-on: ubuntu-latest
environment:
name: ${{ github.ref_name }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
- name: Install dependencies
run: pip install tox
- name: Run tests
run: tox
#deploy:
#if: github.ref != 'refs/heads/base' || github.ref != 'refs/heads/development'
#runs-on: ubuntu-latest
#environment:
#name: ${{ github.ref_name }}
#env:
#LAMBDA_NAME: digitized_av_notifications
#steps:
#- name: Clone deploy scripts if not present
#run: |
#if [ ! -d deploy_scripts ]; then
#git clone https://github.com/RockefellerArchiveCenter/deploy_scripts.git;
#fi
#- name: Substitute environment variables
#uses: tvarohohlavy/[email protected]
#with:
#files: |
#deploy_scripts/make_zip_lambda.sh
#- name: Configure AWS Credentials
#uses: aws-actions/[email protected]
#with:
#aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
#aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
#aws-region: us-east-1
#- name: Create Lambda ZIP package
#run: |
#sudo deploy_scripts/make_zip_lambda.sh $LAMBDA_NAME src/handle_digitized_av_notifications.py
#Replace these with actual AWS commands. Separate them out
#- name: Deploy to Development
#if: github.ref == 'refs/heads/development'
#run: |
#bash deploy_scripts/upload_file_to_s3.sh ${LAMBDA_NAME}.template rac-dev-cloudformation-apps &&
#bash deploy_scripts/upload_file_to_s3.sh ${LAMBDA_NAME}.zip rac-dev-lambda &&
#bash deploy_scripts/deploy_package_lambda.sh ${LAMBDA_NAME}
#- name: Deploy to Base
#if: github.ref == 'refs/heads/base'
#run: |
#bash deploy_scripts/upload_file_to_s3.sh ${LAMBDA_NAME}.template rac-prod-cloudformation-apps &&
#bash deploy_scripts/upload_file_to_s3.sh ${LAMBDA_NAME}.zip rac-prod-lambda &&
#bash deploy_scripts/deploy_package_lambda.sh ${LAMBDA_NAME}