From af838d8fb6a7baad5caa8d618cfb0b527625c4a0 Mon Sep 17 00:00:00 2001 From: heinzel Date: Fri, 9 Aug 2024 13:25:11 +0200 Subject: [PATCH] Gitea Workflow deploy_stage does not use Makefile anymore --- .gitea/workflows/deploy_stage.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/deploy_stage.yml b/.gitea/workflows/deploy_stage.yml index c780d97..70f79f9 100644 --- a/.gitea/workflows/deploy_stage.yml +++ b/.gitea/workflows/deploy_stage.yml @@ -5,15 +5,17 @@ on: - stage workflow_dispatch: +env: + DEPLOY_DIR: "/var/www/touren.alpenverein-karlsruhe.de/wsgi/django-dav-events.stage" + jobs: - make-deploy: + deploy-on-stage: name: Deploy into stage environment runs-on: [django-dav-events, kitty] steps: - - name: "Checkout stage branch of the repository" - run: git clone -b stage "${{ gitea.server_url }}/${{ gitea.repository }}" ./repository - - name: "Run make deploy" - working-directory: ./repository - env: - DEPLOY_DIR: "/var/www/touren.alpenverein-karlsruhe.de/wsgi/django-dav-events.stage" - run: make deploy + - name: "Migrate database" + run: $DEPLOY_DIR/python/bin/python $DEPLOY_DIR/django/manage.py migrate --noinput + - name: "Collect static files" + run: $DEPLOY_DIR/python/bin/python $DEPLOY_DIR/django/manage.py collectstatic --noinput + - name: "Touch wsgi file" + run: touch $DEPLOY_DIR/django/main/wsgi.py