Files
roxane/.gitea/workflows/deploy-preprod.yml
Nebulae 287ec5c477
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 3s
deploy(host ipv6 test)
2025-11-27 14:22:07 +01:00

52 lines
1.4 KiB
YAML

name: Deploy Roxane to Preprod
on:
push:
branches:
- release
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: nebulaed/php83-node22
options: --network=host
steps:
- name: Configure SSH
run: |
mkdir -p ~/.ssh
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -t ed25519 -p ${{ secrets.PREPROD_PORT }} ${{ secrets.PREPROD_HOST }} >> ~/.ssh/known_hosts
- name: Deploy Roxane
run: |
ssh -p ${{ secrets.PREPROD_PORT }} ${{ secrets.PREPROD_USER }}@${{ secrets.PREPROD_HOST }} <<'ENDSSH'
set -e
cd ${{ secrets.PREPROD_PATH }}
echo "Pulling latest Roxane release..."
git pull origin release
echo "Installing Composer dependencies..."
composer install --no-dev --optimize-autoloader --no-interaction
echo "Building frontend with Vite..."
npm ci
npm run build
echo "Running database migrations..."
php artisan migrate --force
echo "Optimizing Roxane..."
php artisan optimize
echo "Restarting queue workers..."
php artisan queue:restart || true
echo "Roxane deployed successfully to preprod!"
ENDSSH