Skip to content

Develop

Develop #4

Workflow file for this run

name: deploy workflow
on:
pull_request:
types:
- closed
branches:
- master
jobs:
deploy:
if: |
github.event.pull_request.merged == true &&
github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands to deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
script: |
[ ! -d together-for-life ] && git clone https://github.com/Studio-Yandex-Practicum/together-for-life.git
cd together-for-life
git pull
docker compose down
echo VK_TOKEN=${{ secrets.VK_TOKEN }} > .env
echo ADMIN_ID=${{ secrets.ADMIN_ID }} >> .env
echo MENU_EDIT_KEY_WORD=${{ secrets.MENU_EDIT_KEY_WORD }} >> .env
docker compose up --build -d