deploy(debug)

This commit is contained in:
2025-11-27 17:45:02 +01:00
parent e0f111b3b3
commit 7fc1a58c3f
2 changed files with 13 additions and 87 deletions

View File

@@ -1,81 +0,0 @@
name: Deploy Roxane to Preprod
on:
push:
branches:
- release
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: nebulaed/php83-node22
steps:
- name: Install network tools
run: |
apt update
apt install -y iproute2 iputils-ping
- name: Check IPv6 inside container
run: |
ip -6 addr
ip -6 route
ping6 -c 3 2a01:e0a:bfe:a8a0::205 || echo "IPv6 failed"
- name: Configure SSH
env:
SSH_HOST: ${{ vars.PREPROD_HOST }}
SSH_PORT: ${{ vars.PREPROD_PORT }}
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
case "$SSH_HOST" in
*:*) SSH_HOST_SSH="[$SSH_HOST]" ;;
*) SSH_HOST_SSH="$SSH_HOST" ;;
esac
echo "Host used for SSH: $SSH_HOST_SSH"
# Ajoute l'hôte dans known_hosts
ssh-keyscan -t ed25519 -p "$SSH_PORT" "$SSH_HOST" >> ~/.ssh/known_hosts
# Exporte pour usage dans les étapes suivantes
echo "SSH_HOST_SSH=$SSH_HOST_SSH" >> $GITHUB_ENV
- name: Deploy Roxane
env:
SSH_USER: ${{ vars.PREPROD_USER }}
SSH_PORT: ${{ vars.PREPROD_PORT }}
SSH_HOST_SSH: ${{ env.SSH_HOST_SSH }}
PREPROD_PATH: ${{ vars.PREPROD_PATH }}
run: |
ssh -p "$SSH_PORT" "$SSH_USER@$SSH_HOST_SSH" <<'ENDSSH'
set -e
cd $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

View File

@@ -1,11 +1,18 @@
name: Test IPv6
run-name: IPv6 connectivity test
name: IPv6-test
run-name: Test IPv6 connectivity
on: [workflow_dispatch]
on:
workflow_dispatch:
jobs:
ipv6-test:
ipv6:
runs-on: ubuntu-latest
steps:
- run: ip a
- run: ping6 -c 3 2a01:e0a:bfe:a8a0::205
- name: Show network
run: |
ip -6 addr
ip -6 route
- name: Ping IPv6 server
run: |
ping6 -c 3 2a01:e0a:bfe:a8a0::205 || true