-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (38 loc) · 1010 Bytes
/
build-and-deploy.yml
File metadata and controls
40 lines (38 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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@v6
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: 3.14
- 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/scp-deploy@v1.3.0
with:
src: ./build/*
host: ${{ secrets.SSH_HOST }}
remote: ${{ secrets.SSH_DIR }}
port: ${{ secrets.SSH_PORT }}
user: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}