This commit is contained in:
25
.gitea/workflows/deploy.yml
Normal file
25
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Deploy to Production
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Deploy to server
|
||||||
|
uses: appleboy/ssh-action@v0.1.5
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.HOST }}
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
key: ${{ secrets.SSH_KEY }}
|
||||||
|
script: |
|
||||||
|
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 .
|
||||||
Reference in New Issue
Block a user