Update DATA_DIR configuration to use environment variable with fallback #18
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: 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 |