add copy deployment setup to vps
Build & Push / Pipeline Tests (push) Successful in 1m50s
Test / Type Check (all packages) (push) Successful in 52s
Build & Push / Build & Push Docker Image (push) Successful in 25s
Test / API Unit Tests (push) Successful in 1m5s
Test / Homepage Unit Tests (push) Successful in 46s
Test / Carplace Unit Tests (push) Successful in 44s
Test / Admin Unit Tests (push) Successful in 42s
Test / Dashboard Unit Tests (push) Successful in 43s
Test / API Integration Tests (push) Successful in 1m6s

This commit is contained in:
root
2026-08-09 13:20:18 -04:00
parent 92f1ff655e
commit cfc3f371de
+35
View File
@@ -421,3 +421,38 @@ jobs:
docker push '$IMAGE_LATEST'
fi
"
- name: Publish deployment files to VPS
env:
IMAGE_REPOSITORY: ${{ steps.image-meta.outputs.repository }}
IMAGE_TAG: ${{ gitea.sha }}
REMOTE_BUILD_DIR: ${{ env.DEPLOY_ROOT }}/build-context
VPS_HOST: ${{ secrets.VPS_IP }}
run: |
VPS_HOST="${VPS_HOST:-$DEPLOY_SSH_HOST}"
if [ -z "$VPS_HOST" ]; then
echo "::error::VPS_IP secret or DEPLOY_SSH_HOST is required"
exit 1
fi
SSH_OPTIONS="-i $HOME/.ssh/id_rsa -o BatchMode=yes -o IdentitiesOnly=yes -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=$HOME/.ssh/known_hosts"
ssh $SSH_OPTIONS "${{ secrets.VPS_USER }}@$VPS_HOST" "
set -e
cd '$REMOTE_BUILD_DIR'
mkdir -p '$DEPLOY_ROOT/scripts'
cp docker-compose.production.yml '$DEPLOY_ROOT/docker-compose.production.yml'
cp docker-compose.portainer.production.yml '$DEPLOY_ROOT/docker-compose.portainer.production.yml'
cp docker-compose.registry.production.yml '$DEPLOY_ROOT/docker-compose.registry.production.yml'
cp traefik.yaml '$DEPLOY_ROOT/traefik.yaml'
cp scripts/apply-env-secret-overrides.sh '$DEPLOY_ROOT/scripts/apply-env-secret-overrides.sh'
cp scripts/describe-env-values.sh '$DEPLOY_ROOT/scripts/describe-env-values.sh'
cp scripts/docker-prod-*.sh '$DEPLOY_ROOT/scripts/'
cp scripts/preserve-env-values.sh '$DEPLOY_ROOT/scripts/preserve-env-values.sh'
chmod +x '$DEPLOY_ROOT/scripts/'*.sh
printf '%s\n' \
'APP_IMAGE=$DEPLOY_REGISTRY_HOST/$IMAGE_REPOSITORY' \
'IMAGE_TAG=$IMAGE_TAG' \
'REGISTRY_HOST=$DEPLOY_REGISTRY_HOST' \
> '$DEPLOY_ROOT/release.env'
chmod 600 '$DEPLOY_ROOT/release.env'
echo 'Deployment files published to $DEPLOY_ROOT. Production was not deployed.'
"