Files
caloriethingy.com/.gitea/workflows/deploy.yml
Chris Smith b1bbae109c
Some checks failed
Deploy to Production / deploy (push) Failing after 12m43s
Update .gitea/workflows/deploy.yml
2025-09-27 08:28:56 -05:00

30 lines
970 B
YAML

name: Deploy to Production
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Deploy to prod server
uses: appleboy/ssh-action@v0.1.5
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
# Clone repo if it doesn't exist
if [ ! -d "/var/www/caloriethingy.com/.git" ]; then
rm -rf /var/www/caloriethingy.com
git clone https://git.sometimescode.com/cgsmith/caloriethingy.com.git /var/www/caloriethingy.com
fi
cd /var/www/caloriethingy.com
git pull origin main
composer install --no-dev --optimize-autoloader
php init --env=Production --overwrite=n
php yii migrate
systemctl restart calorie-queue@*
chown -R www-data:www-data .