Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
heythisischris authored Mar 20, 2024
1 parent 096eaa7 commit 9bf7c13
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy
on:
push:
branches:
- main
- staging
jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Deploy to Lambda
run: |
npm install
npx esbuild ./*.ts --bundle --platform=node --outdir=dist --external:@aws-sdk
cd dist
zip -r lambda.zip * > /dev/null
aws lambda update-function-code --function-name equalify-llm-api${{ github.ref != 'refs/heads/main' && '-staging' || '' }} --zip-file fileb://lambda.zip > /dev/null

0 comments on commit 9bf7c13

Please sign in to comment.