From 608e40021372e43ad0aa138c4bacb6ad082dbd83 Mon Sep 17 00:00:00 2001 From: Hyeongjun Ham Date: Wed, 12 Nov 2025 12:47:08 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=ED=99=98?= =?UTF-8?q?=EA=B2=BD=20=EB=B0=B0=ED=8F=AC=EB=A5=BC=20=EC=9C=84=ED=95=9C=20?= =?UTF-8?q?Github=20action=20=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C=EC=9A=B0?= =?UTF-8?q?=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test-deploy.yml | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/test-deploy.yml diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml new file mode 100644 index 0000000..a48f8e9 --- /dev/null +++ b/.github/workflows/test-deploy.yml @@ -0,0 +1,43 @@ +name: Deploy Python Lambda to AWS (from src) + +on: + push: + branches: + - test-deploy + +jobs: + deploy_lambda: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install dependencies + run: | + pip install -r requirements.txt -t ./src + + - name: Zip deployment package + run: | + cd src + zip -r ../deployment-package.zip . + + - name: Configure AWS Credentials (OIDC) + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + aws-region: us-west-2 + + - name: Deploy to AWS Lambda + run: | + aws lambda update-function-code \ + --function-name analyzeTermOfServicesTest \ + --zip-file fileb://deployment-package.zip \ No newline at end of file