Skip to content

Update DATA_DIR configuration to use environment variable with fallback #18

Update DATA_DIR configuration to use environment variable with fallback

Update DATA_DIR configuration to use environment variable with fallback #18

name: CI Pipeline
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: self-hosted
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
- name: Deploy code & restart service
run: |
# e.g. copy your updated code to /home/runner-user/app
#cp -R . /home/runner-user/app
# Now restart the systemd service
sudo systemctl stop myflaskapp || true
sudo systemctl start myflaskapp
# or: sudo systemctl restart myflaskapp