sub domain deploy for branches 17

This commit is contained in:
valere
2026-02-02 20:57:28 +01:00
parent c5e5f1abf5
commit 4ff3da8380

View File

@@ -11,15 +11,17 @@ jobs:
- uses: actions/checkout@v4
- name: Build app
run: |
bash ./.github/workflows/setup-env.sh
set -a && source .env && set +a
[ -n "$APP_NAME" ] && bash /var/docker-web/src/cli.sh down "${APP_NAME}"
rm -rf "$APP_DIR"
mkdir "$APP_DIR"
cp -a $(find . -mindepth 1 -maxdepth 1 ! -name '.git' ! -name 'node_modules') "$APP_DIR/"
export COMPOSE_BAKE=false
docker rmi "local/${APP_NAME}" 2>/dev/null || true
[ -n "$APP_NAME" ] && bash /var/docker-web/src/cli.sh build "${APP_NAME}"
bash ./.github/workflows/setup-env.sh
if [ -n "$APP_NAME" ]; then
set -a && source .env && set +a
bash /var/docker-web/src/cli.sh down "${APP_NAME}"
rm -rf "$APP_DIR"
mkdir "$APP_DIR"
cp -a $(find . -mindepth 1 -maxdepth 1 ! -name '.git' ! -name 'node_modules') "$APP_DIR/"
export COMPOSE_BAKE=false
docker rmi "local/${APP_NAME}" 2>/dev/null || true
bash /var/docker-web/src/cli.sh build "${APP_NAME}"
fi
deploy:
runs-on: ubuntu-22.04
@@ -32,5 +34,7 @@ jobs:
- name: Deploy
run: |
bash ./.github/workflows/setup-env.sh
set -a && source .env && set +a
[ -n "$APP_NAME" ] && bash /var/docker-web/src/cli.sh up "${APP_NAME}"
if [ -n "$APP_NAME" ]; then
set -a && source .env && set +a
bash /var/docker-web/src/cli.sh up "${APP_NAME}"
fi