Added Deploy.yml
Some checks failed
Deploy ThorsHammerNew / deploy (push) Failing after 3s

This commit is contained in:
Ben Mosley
2026-04-25 13:06:31 -05:00
parent 5d86aa000c
commit 21921ebe0b
2 changed files with 36 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
# .gitea/workflows/deploy.yml
name: Deploy ThorsHammerNew
on:
push:
branches:
- main
jobs:
deploy:
runs-on: linux
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
cd ${{ github.workspace }}
pip install -r requirements.txt
- name: Copy files to app directory
run: |
rsync -av --delete \
--exclude '.git' \
--exclude '.gitea' \
--exclude '*.db' \
--exclude '.env' \
--exclude 'ga_key.json' \
${{ github.workspace }}/ /var/www/thorshammernew/
- name: Restart app service
run: |
sudo systemctl restart thorshammernew

3
app.py
View File

@@ -315,6 +315,7 @@ def send_push_notification(name, job):
print(f"Push notification failed: {response.status_code} - {response.text}") print(f"Push notification failed: {response.status_code} - {response.text}")
if __name__ == '__main__':
init_db() init_db()
if __name__ == '__main__':
app.run(debug=True) app.run(debug=True)