Skip to content

removed commnets

removed commnets #2

Workflow file for this run

name: Python application
on:
push:
branches: [ "main", "develop"]
pull_request:
branches: [ "main", "develop"]
permissions:
contents: read
jobs:
black-test:
runs-on: ubuntu-latest
container: python:3.11
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: pip install black
- name: Check code formatting with black
run: black ./tfinance --check --verbose --diff
flake8-test:
runs-on: ubuntu-latest
container: python:3.11
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: pip install -r requirements/test.txt
- name: Check code formatting with flake8
run: flake8 ./tfinance
prod-deploy:
if: github.ref == 'refs/heads/main'
needs: [ black-test, flake8-test ]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Deploy to server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
cd ~/tfinance
git reset --hard origin/main
git pull origin main
source venv/bin/activate
pip install -r requirements/prod.txt
cd ~/tfinance/tfinance
python main.py