Initial deploy setup
deploy / deploy (push) Canceled after 0s

This commit is contained in:
Jens
2026-07-21 14:00:00 +02:00
commit b8091e59bd
285 changed files with 27854 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
name: deploy
on:
push:
branches:
- main
- master
permissions:
contents: read
concurrency:
group: deploy-${{ github.ref }}
cancel-in-progress: false
jobs:
deploy:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Push-to-deploy op server
run: |
set -euo pipefail
if [ -z "${DEPLOY_COMPOSE_FILE:-}" ]; then
DEPLOY_COMPOSE_FILE="docker-compose.yml"
fi
if [ -z "${APP_HOST:-}" ]; then
APP_HOST="$(hostname -f 2>/dev/null || hostname)"
fi
if [ -z "${APP_SCHEME:-}" ]; then
APP_SCHEME="http"
fi
if [ -z "${DJANGO_DEBUG:-}" ]; then
if [ "${APP_SCHEME}" = "https" ]; then
DJANGO_DEBUG="0"
else
DJANGO_DEBUG="1"
fi
fi
export APP_HOST
export APP_SCHEME
export DJANGO_DEBUG
export DEPLOY_COMPOSE_FILE
if [ -n "${APP_ORIGINS:-}" ]; then
export APP_ORIGINS
fi
if [ -n "${APP_HOSTS:-}" ]; then
export APP_HOSTS
fi
if [ -n "${APP_PORT:-}" ]; then
export APP_PORT
fi
bash scripts/deploy_docker.sh "${DEPLOY_COMPOSE_FILE}" .env