Реализация анимированных стикеров со стороны ВК. #42
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 | |
on: [push, workflow_dispatch] | |
jobs: | |
run_pull: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt pytest | |
- name: Run pytest | |
run: | | |
python -m pytest -v | |
- name: Deploy on server | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USER }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
script: | | |
cd ${{ secrets.WORK_DIR }} | |
branch_name=$(basename ${{ github.ref }}) | |
git checkout ${{ secrets.MAIN_BRANCH }} | |
git fetch --all | |
git reset --hard origin/$branch_name | |
source venv/bin/activate | |
pip install -r requirements.txt | |
systemctl --user restart ${{ secrets.SERVICE_NAME }} | |
exit |