From b956115e53b67cdd279b069e01adf276424d45bb Mon Sep 17 00:00:00 2001 From: JnTon <84038748+JnTon@users.noreply.github.com> Date: Sun, 7 Apr 2024 21:14:16 +0200 Subject: [PATCH] Create deploy.yml --- .github/workflows/deploy.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..7a9a4d0 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,30 @@ +name: Deploy Telegram Bot to AWS Lambda + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: | + pip install -r requirements.txt + - name: Package Application + run: | + zip -r package.zip . -x "*.git*" "venv/*" ".env*" ".github/*" + - name: Deploy to AWS Lambda + uses: appleboy/lambda-action@v0.0.11 + with: + aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws_region: ${{ secrets.AWS_REGION }} + function_name: "YourLambdaFunctionName" + zip_file: package.zip