Add .gitignore file to exclude common files #2
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 to GCE | |
| on: | |
| push: | |
| branches: [ main ] # 当主分支有更新时触发 | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Deploy via SSH | |
| uses: appleboy/ssh-action@master | |
| with: | |
| host: ${{ secrets.GCE_HOST }} | |
| username: ${{ secrets.GCE_USERNAME }} | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| script: | | |
| cd ~/ib-docker | |
| git pull origin main | |
| docker compose down | |
| docker compose up -d | |
| docker exec -u 0 ib-gateway apt-get update && apt-get install -y python3-pip xdotool | |
| docker exec -u 0 ib-gateway pip3 install pyotp | |
| docker exec -d ib-gateway python3 /home/ibgateway/2fa_bot.py |