update price on order #56
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 production | |
on: | |
push: | |
branches: | |
- sandbox-2 | |
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:sandbox-2-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-sandbox.yml | |
uses: garygrossgarten/github-action-scp@release | |
with: | |
local: docker-compose-app-sandbox-2.yml | |
remote: ./tinkoff-invest-robot/docker-compose-app-sandbox-2.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_SANDBOX=${{ secrets.TINKOFF_TOKEN_SANDBOX }} | |
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-sandbox-2.yml down | |
docker-compose -f docker-compose-app-sandbox-2.yml pull | |
docker-compose -f docker-compose-app-sandbox-2.yml up -d |