Skip to content

Commit 2d0edb1

Browse files
Update deploy.yml
1 parent 2ad1e50 commit 2d0edb1

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,21 @@ jobs:
2525
source venv/bin/activate
2626
pip install --upgrade pip
2727
pip install flask requests python-dotenv
28-
if [ -f "requirements.txt" ]; then pip install -r requirements.txt; fi
28+
if [ -f "requirements.txt" ]; then
29+
pip install -r requirements.txt
30+
fi
2931
3032
- name: 🗃️ Create test database
3133
run: |
32-
python -c "
34+
python -c '
3335
import sqlite3
34-
conn = sqlite3.connect('sites.db')
35-
conn.execute('CREATE TABLE IF NOT EXISTS sites (id INTEGER PRIMARY KEY, url TEXT)')
36-
conn.execute('CREATE TABLE IF NOT EXISTS logs (id INTEGER PRIMARY KEY, site_id INTEGER, status INTEGER)')
36+
conn = sqlite3.connect("sites.db")
37+
conn.execute("CREATE TABLE IF NOT EXISTS sites (id INTEGER PRIMARY KEY, url TEXT)")
38+
conn.execute("CREATE TABLE IF NOT EXISTS logs (id INTEGER PRIMARY KEY, site_id INTEGER, status INTEGER)")
3739
conn.commit()
3840
conn.close()
39-
print('✅ DB created')
40-
"
41+
print("✅ DB created")
42+
'
4143
4244
- name: 📁 Create dummy templates
4345
run: |
@@ -60,7 +62,7 @@ print('✅ DB created')
6062
sleep 10
6163
curl -f http://localhost:5000 || exit 1
6264
curl -f http://localhost:5000/admin || true
63-
kill $(ps aux | grep 'python app.py' | awk '{print $2}') || true
65+
pkill -f "python app.py" || true
6466
6567
- name: 🧹 Cleanup
6668
if: always()

0 commit comments

Comments
 (0)