diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c3d17a3..f94f92b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -37,7 +37,13 @@ jobs: run: npm ci - name: Deploy Lambda function + env: + AWS_ACCESS_KEY: ${{ secrets.MY_AWS_ACCESS_KEY }} + AWS_SECRET_KEY: ${{ secrets.MY_AWS_SECRET_KEY }} + OPENSEARCH_HOST: ${{ secrets.OPENSEARCH_HOST }} + OPENSEARCH_USERNAME: ${{ secrets.OPENSEARCH_USERNAME }} + OPENSEARCH_PASSWORD: ${{ secrets.OPENSEARCH_PASSWORD }} + BUCKET_NAME: ${{ secrets.BUCKET_NAME }} run: | npx serverless deploy --stage dev --verbose npx serverless info --stage dev - diff --git a/serverless.yml b/serverless.yml index 6b91c4e..4913766 100644 --- a/serverless.yml +++ b/serverless.yml @@ -8,11 +8,11 @@ provider: runtime: python3.11 environment: PYTHONPATH: ./src - MY_AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} - MY_AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} - OPENSEARCH_HOST: ${{ secrets.OPENSEARCH_HOST }} - OPENSEARCH_USERNAME: ${{ secrets.OPENSEARCH_USERNAME }} - OPENSEARCH_PASSWORD: ${{ secrets.OPENSEARCH_PASSWORD }} + MY_AWS_ACCESS_KEY: ${env:MY_AWS_ACCESS_KEY_ID} + MY_AWS_SECRET_KEY: ${env:MY_AWS_SECRET_ACCESS_KEY} + OPENSEARCH_HOST: ${env:OPENSEARCH_HOST} + OPENSEARCH_USERNAME: ${env:OPENSEARCH_USERNAME} + OPENSEARCH_PASSWORD: ${env:OPENSEARCH_PASSWORD} region: ap-south-1 iam: role: