Skip to content

Update description and strategies #35

Update description and strategies

Update description and strategies #35

name: Deploy production
on:
push:
branches:
- master
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: romanew/invest:live-latest
username: ${{ secrets.DOCKER_PUBLISH_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_PUBLISH_REGISTRY_PASSWORD }}
dockerfile: Dockerfile.App
deploy:
needs: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Copy docker-compose-app-live.yml
uses: garygrossgarten/github-action-scp@release
with:
local: docker-compose-app-live.yml
remote: ./tinkoff-invest-robot/docker-compose-app-live.yml
host: 31.186.136.15
username: root
privateKey: ${{ secrets.SSH_PRIVATE_KEY_PERSONAL }}
- name: Start using docker-compose
uses: appleboy/ssh-action@master
with:
host: 31.186.136.15
username: root
key: ${{ secrets.SSH_PRIVATE_KEY_PERSONAL }}
script: |
cd tinkoff-invest-robot
export TINKOFF_TOKEN=${{ secrets.TINKOFF_TOKEN }}
export POSTGRES_USER=${{ secrets.POSTGRES_USER }}
export POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }}
export TELEGRAM_BOT_TOKEN=${{ secrets.TELEGRAM_BOT_TOKEN }}
export TELEGRAM_BOT_CHAT_ID=${{ secrets.TELEGRAM_BOT_CHAT_ID }}
docker-compose -f docker-compose-app-live.yml down
docker-compose -f docker-compose-app-live.yml pull
docker-compose -f docker-compose-app-live.yml up -d