-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (60 loc) · 2 KB
/
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
name: Deploy to AWS Lambda
on:
push:
branches:
- main
paths:
- 'lambda-pipeline/**'
- '.github/**'
- 'app.py'
- 'Dockerfile'
- 'requirements.txt'
- 'template.yml'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
cd lambda-pipeline
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install AWS SAM CLI
run: |
cd lambda-pipeline
pip install aws-sam-cli
- name: Build with SAM
run: |
cd lambda-pipeline
sam build
- name: Deploy with SAM
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
HFZEBRA_LLAMA_API_URL: ${{ secrets.HF_ZEBRA_LLAMA_API_URL }}
HACKATHON_API_KEY: ${{ secrets.HACKATHON_API_KEY }}
ANDREW_API_KEY: ${{ secrets.ANDREW_API_KEY }}
RAG_PINECONE_INDEX: ${{ secrets.RAG_PINECONE_INDEX }}
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
run: |
cd lambda-pipeline
sam deploy \
--stack-name zebra-llama-stack \
--resolve-s3 \
--s3-prefix zebra-llama-stack \
--region ${{ secrets.AWS_DEFAULT_REGION }} \
--no-confirm-changeset \
--capabilities CAPABILITY_IAM \
--parameter-overrides \
HFZebraLlamaApiUrl=${{ secrets.HF_ZEBRA_LLAMA_API_URL }} \
HackathonApiKey=${{ secrets.HACKATHON_API_KEY }} \
AndrewApiKey=${{ secrets.ANDREW_API_KEY }} \
RagPineconeIndex=${{ secrets.RAG_PINECONE_INDEX }} \
GroqApiKey=${{ secrets.GROQ_API_KEY }}