deploy(debug)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Has been cancelled

This commit is contained in:
2025-11-27 17:49:42 +01:00
parent 2ceadbd287
commit 503b8a256c
2 changed files with 70 additions and 22 deletions

View File

@@ -1,13 +1,23 @@
name: IPv6-test name: Deploy Roxane to Preprod
run-name: Test IPv6 connectivity
on: on:
workflow_dispatch: push:
branches:
- release
jobs: jobs:
ipv6: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: nebulaed/php83-node22
steps: steps:
- name: Install network tools
run: |
apt update
apt install -y iproute2 iputils-ping
- name: Show network - name: Show network
run: | run: |
ip -6 addr ip -6 addr
@@ -16,3 +26,59 @@ jobs:
- name: Ping IPv6 server - name: Ping IPv6 server
run: | run: |
ping6 -c 3 2a01:e0a:bfe:a8a0::205 || true ping6 -c 3 2a01:e0a:bfe:a8a0::205 || true
- 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,18 +0,0 @@
name: IPv6-test
run-name: Test IPv6 connectivity
on:
workflow_dispatch:
jobs:
ipv6:
runs-on: ubuntu-latest
steps:
- name: Show network
run: |
ip -6 addr
ip -6 route
- name: Ping IPv6 server
run: |
ping6 -c 3 2a01:e0a:bfe:a8a0::205 || true