action added bot working flake8 to emplement #25
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: TheKirillovs Bot workflow | |
on: [push] | |
jobs: | |
# tests: | |
# # «Раннер» — создание изолированного окружения с последней версией Ubuntu | |
# runs-on: ubuntu-latest | |
# steps: | |
# # Запуск actions checkout — готового скрипта | |
# # для клонирования репозитория | |
# - uses: actions/checkout@v2 | |
# - name: Set up Python | |
# # Запуск actions setup-python — готового скрипта | |
# # для развёртывания окружения Python | |
# uses: actions/setup-python@v2 | |
# with: | |
# # Выбор версии Python | |
# python-version: 3.7 | |
# - name: Install dependencies | |
# run: | | |
# # обновление pip | |
# python -m pip install --upgrade pip | |
# # установка flake8 и его плагинов | |
# pip install flake8 pep8-naming flake8-broken-line flake8-return flake8-isort | |
# # установка зависимостей | |
# # pip install -r requirements.txt | |
# - name: Test with flake8 and django tests | |
# run: | | |
# # запуск проверки проекта по flake8 | |
# python -m flake8 | |
deploy: | |
runs-on: ubuntu-latest | |
# needs: tests | |
steps: | |
- name: executing remote ssh commands to deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USER }} | |
key: ${{ secrets.SSH_KEY }} | |
script: | | |
# переход в папку проекта | |
cd ../home/Admin/TheKirillovs_bot/ | |
# Выполняет pull репозитория с GitHub | |
sudo git pull | |
# перезапуск юнита myBot | |
systemctl stop myBot | |
# systemctl start myBot |