Deploy TodayWhat iOS Bot #61
This file contains 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 TodayWhat iOS Bot | |
on: | |
push: | |
branches: ["master"] | |
workflow_dispatch: | |
jobs: | |
deploy_bot: | |
name: 🚀 Deploy TodayWhat Bot | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Execute Docker | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.EC2_HOST }} | |
username: ${{ secrets.EC2_USERNAME }} | |
key: ${{ secrets.EC2_KEY }} | |
script: | | |
cd TodayWhat-Bot | |
git pull | |
sudo docker rm -f todaywhat-bot-container | |
sudo docker build . -t todaywhat-bot-image | |
sudo docker run -i -t -d --name todaywhat-bot-container todaywhat-bot-image |