34 lines
750 B
YAML
34 lines
750 B
YAML
# .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 |