Skip to content

Build and deploy

Build and deploy #289

name: Build and deploy
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "25 * * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
- name: render website
run: |
python render3.py build
- name: Deploy
if: github.event_name == 'push' || github.event_name == 'schedule'
uses: nogsantos/[email protected]
with:
src: ./build/*
host: ${{ secrets.SSH_HOST }}
remote: ${{ secrets.SSH_DIR }}
port: ${{ secrets.SSH_PORT }}
user: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}