Фикс пайплайна #2
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: Production Deploy | ||
on: | ||
push: | ||
branches: [master] | ||
workflow_run: | ||
workflows: [Docker Image Builder] | ||
branches: [master] | ||
types: | ||
- completed | ||
jobs: | ||
deploy: | ||
name: Деплой на сервер | ||
runs-on: ubuntu-latest | ||
needs: [ docker-build ] | ||
if: ${{ secrets.NEED_DEPLOY }} == 'true' | ||
Check failure on line 17 in .github/workflows/deploy.yml
|
||
steps: | ||
- name: Пул Докер образов, git pull и перезапуск сервера | ||
uses: appleboy/ssh-action@v0.1.10 | ||
with: | ||
host: ${{ secrets.SSH_HOST }} | ||
username: ${{ secrets.SSH_USERNAME }} | ||
password: ${{ secrets.SSH_PASSWORD }} | ||
port: ${{ secrets.SSH_PORT }} | ||
script_stop: true | ||
script: | | ||
cd ${{ secrets.DOCKER_ENV_PATH }} | ||
zsh sandbox stop | ||
git reset --hard | ||
git pull | ||
docker-compose -f docker-compose.build.yml pull | ||
zsh sandbox start |