fix: mcp call #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Telegram Bot to EC2 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| name: Deploy to EC2 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup SSH key | |
| run: | | |
| echo "${{ secrets.EC2_SSH_KEY }}" > aws-keypair.pem | |
| chmod 400 aws-keypair.pem | |
| - name: Set up SSH known_hosts | |
| run: | | |
| mkdir -p ~/.ssh | |
| ssh-keyscan -H ${{ secrets.EC2_HOST }} >> ~/.ssh/known_hosts | |
| - name: Deploy to EC2 | |
| run: | | |
| ssh ${{ secrets.EC2_USER }}@${{ secrets.EC2_HOST }} -i "aws-keypair.pem" << 'EOF' | |
| sudo su | |
| sh bot-installer.sh | |
| EOF |