Compare commits

...

28 Commits

Author SHA1 Message Date
ad47b58ad3 fix(Maintenance File)
All checks were successful
Deploy Roxane to Preprod / deploy (push) Successful in 45s
2025-12-21 13:59:30 +01:00
7f1c132eb7 fix(deploy-preprod file)
All checks were successful
Deploy Roxane to Preprod / deploy (push) Successful in 38s
2025-12-21 13:56:10 +01:00
53eb3983f7 fix(deploy-preprod file)
All checks were successful
Deploy Roxane to Preprod / deploy (push) Successful in 38s
2025-12-21 13:35:09 +01:00
cb52c3e44b fix(deploy-preprod file)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 9s
2025-12-21 13:31:29 +01:00
302efae864 fix(deploy-preprod file)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 10s
2025-12-21 13:23:08 +01:00
e48061c252 fix(deploy-preprod file)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 11s
2025-12-21 13:19:41 +01:00
eacb6dff58 fix(deploy-preprod file)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 29s
2025-12-21 13:11:40 +01:00
6a1fca0765 fix(Maintenance page)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Has been cancelled
2025-12-21 13:03:02 +01:00
503b8a256c deploy(debug)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Has been cancelled
2025-11-27 17:49:42 +01:00
2ceadbd287 deploy(debug) 2025-11-27 17:47:02 +01:00
7fc1a58c3f deploy(debug) 2025-11-27 17:45:02 +01:00
e0f111b3b3 deploy(debug)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 24s
2025-11-27 17:40:55 +01:00
b106942423 deploy(debug)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 25s
2025-11-27 17:33:43 +01:00
3fcf74f311 deploy(debug)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 9s
2025-11-27 16:55:06 +01:00
41c383ca5a deploy(debug)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 8s
2025-11-27 16:40:04 +01:00
5f36244db1 deploy(debug)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 3s
2025-11-27 16:32:55 +01:00
782ff9e69d deploy(debug)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 4s
2025-11-27 16:18:59 +01:00
64ea65deba deploy(debug)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 3s
2025-11-27 16:15:00 +01:00
ae5d2e52aa deploy(debug)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 3s
2025-11-27 16:12:26 +01:00
52da2c79d6 deploy(debug)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 5s
2025-11-27 16:04:06 +01:00
3900dcda2a deploy(ipv6 ssh)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 3s
2025-11-27 15:40:00 +01:00
a36c59f6fb deploy(no container test)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 4s
2025-11-27 14:24:15 +01:00
287ec5c477 deploy(host ipv6 test)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 3s
2025-11-27 14:22:07 +01:00
009d37569f deploy(change docker image)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 19s
2025-11-26 17:05:18 +01:00
6c99ed7544 deploy(fix workflow container)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 2s
2025-11-26 16:25:15 +01:00
9b0b99b12a feat(Maintenance page)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 1s
2025-11-26 16:16:22 +01:00
c1bfbcceca Deploy(Init Gitea preprod deploy)
Some checks failed
Deploy Roxane to Preprod / deploy (push) Failing after 1s
Test Runner / test (push) Failing after 2s
2025-11-26 16:03:22 +01:00
d3c7ff924a test runner gitea
Some checks failed
Test Runner / test (push) Failing after 23s
2025-11-26 13:02:12 +01:00
4 changed files with 265 additions and 16 deletions

View File

@@ -0,0 +1,142 @@
name: Deploy Roxane to Preprod
on:
push:
branches:
- release
jobs:
deploy:
runs-on: docker
container:
image: nebulaed/php83-node22
steps:
- name: Install network & SSH tools
run: |
set -e
apt update
apt install -y iproute2 iputils-ping openssh-client git
- name: Show IPv6 network
run: |
ip -6 addr
ip -6 route
- name: Ping IPv6 preprod server
run: |
ping6 -c 3 2a01:e0a:bfe:a8a0::205
- name: Configure SSH
env:
SSH_HOST: ${{ vars.PREPROD_HOST }}
SSH_PORT: ${{ vars.PREPROD_PORT }}
run: |
set -e
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -6 -p "$SSH_PORT" "$SSH_HOST" >> ~/.ssh/known_hosts
echo "SSH_HOST_SSH=$SSH_HOST" >> "$GITEA_ENV"
- name: Deploy Roxane to preprod
env:
SSH_USER: ${{ vars.PREPROD_USER }}
SSH_PORT: ${{ vars.PREPROD_PORT }}
PREPROD_PATH: ${{ vars.PREPROD_PATH }}
GIT_REPO: ${{ vars.GIT_REPO }}
run: |
set -e
ssh -6 -o StrictHostKeyChecking=yes \
-o ConnectTimeout=10 \
-o ServerAliveInterval=60 \
-p "$SSH_PORT" \
"$SSH_USER@$SSH_HOST_SSH" bash -l -s <<'EOF' "$PREPROD_PATH" "$GIT_REPO"
set -e
PREPROD_PATH="$1"
GIT_REPO="$2"
# Vérifier si le dépôt existe, sinon le cloner
if [ ! -d "$PREPROD_PATH/.git" ]; then
echo "[!] Repository not found. Cloning from $GIT_REPO..."
mkdir -p "$(dirname "$PREPROD_PATH")"
git clone "$GIT_REPO" "$PREPROD_PATH"
cd "$PREPROD_PATH"
git checkout release
else
cd "$PREPROD_PATH"
git config --global --add safe.directory "$PREPROD_PATH" 2>/dev/null || true
echo "[>>] Pulling latest Roxane release..."
git fetch origin
git checkout release
git reset --hard origin/release
git clean -fd # Nettoyer les fichiers non trackés
fi
echo "[*] Installing Composer dependencies..."
composer install --no-dev --optimize-autoloader --no-interaction --prefer-dist
echo "[~] Building frontend with Vite..."
npm ci --prefer-offline
npm run build
echo "[DB] Running database migrations..."
php artisan migrate --force
echo "[++] Optimizing Roxane..."
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan event:cache
echo "[<>] Restarting queue workers..."
php artisan queue:restart || true
echo "[OK] Roxane deployed successfully to preprod!"
EOF
- name: Verify deployment
if: success()
env:
SSH_USER: ${{ vars.PREPROD_USER }}
SSH_PORT: ${{ vars.PREPROD_PORT }}
PREPROD_PATH: ${{ vars.PREPROD_PATH }}
run: |
ssh -6 -o StrictHostKeyChecking=yes \
-p "$SSH_PORT" \
"$SSH_USER@$SSH_HOST_SSH" bash -l -s <<'EOF' "$PREPROD_PATH"
set -e
cd "$1"
echo "[?] Verifying deployment..."
echo "Current branch: $(git branch --show-current)"
echo "Last commit: $(git log -1 --oneline)"
echo "Laravel version: $(php artisan --version)"
EOF
- name: Cleanup on failure
if: failure()
env:
SSH_USER: ${{ vars.PREPROD_USER }}
SSH_PORT: ${{ vars.PREPROD_PORT }}
PREPROD_PATH: ${{ vars.PREPROD_PATH }}
run: |
ssh -6 -o StrictHostKeyChecking=yes \
-p "$SSH_PORT" \
"$SSH_USER@$SSH_HOST_SSH" bash -l -s <<'EOF' "$PREPROD_PATH"
cd "$1"
echo "[!!] Deployment failed. Rolling back optimizations..."
php artisan config:clear || true
php artisan route:clear || true
php artisan view:clear || true
php artisan cache:clear || true
EOF

View File

@@ -0,0 +1,29 @@
import React, { useState, useEffect } from "react";
export default function MaintenancePage() {
const [dark, setDark] = useState(false);
useEffect(() => {
if (dark) {
document.documentElement.classList.add("dark");
} else {
document.documentElement.classList.remove("dark");
}
}, [dark]);
return (
<div className="min-h-screen flex flex-col items-center justify-center bg-gray-100 dark:bg-gray-900 text-gray-900 dark:text-gray-100 p-6 transition-colors duration-300">
<button
onClick={() => setDark(!dark)}
className="absolute top-4 right-4 px-3 py-1 rounded-xl border border-gray-400 dark:border-gray-600 hover:bg-gray-200 dark:hover:bg-gray-800 transition"
>
{dark ? "☀️ Mode clair" : "🌙 Mode sombre"}
</button>
<h1 className="text-4xl font-bold mb-4 text-center">Site en cours de construction</h1>
<p className="text-lg text-center max-w-xl">
Le Retzien Libre se refait une beauté. Le site sera visible très bientôt.
</p>
</div>
);
}

View File

@@ -138,7 +138,7 @@ logout.form = logoutForm
/** /**
* @see routes/web.php:6 * @see routes/web.php:6
* @route '/' * @route '/welcome'
*/ */
export const home = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ export const home = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
url: home.url(options), url: home.url(options),
@@ -147,12 +147,12 @@ export const home = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
home.definition = { home.definition = {
methods: ["get","head"], methods: ["get","head"],
url: '/', url: '/welcome',
} satisfies RouteDefinition<["get","head"]> } satisfies RouteDefinition<["get","head"]>
/** /**
* @see routes/web.php:6 * @see routes/web.php:6
* @route '/' * @route '/welcome'
*/ */
home.url = (options?: RouteQueryOptions) => { home.url = (options?: RouteQueryOptions) => {
return home.definition.url + queryParams(options) return home.definition.url + queryParams(options)
@@ -160,7 +160,7 @@ home.url = (options?: RouteQueryOptions) => {
/** /**
* @see routes/web.php:6 * @see routes/web.php:6
* @route '/' * @route '/welcome'
*/ */
home.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ home.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
url: home.url(options), url: home.url(options),
@@ -169,7 +169,7 @@ home.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
/** /**
* @see routes/web.php:6 * @see routes/web.php:6
* @route '/' * @route '/welcome'
*/ */
home.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ home.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
url: home.url(options), url: home.url(options),
@@ -178,7 +178,7 @@ home.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
/** /**
* @see routes/web.php:6 * @see routes/web.php:6
* @route '/' * @route '/welcome'
*/ */
const homeForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({ const homeForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
action: home.url(options), action: home.url(options),
@@ -187,7 +187,7 @@ const homeForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
/** /**
* @see routes/web.php:6 * @see routes/web.php:6
* @route '/' * @route '/welcome'
*/ */
homeForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({ homeForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
action: home.url(options), action: home.url(options),
@@ -196,7 +196,7 @@ homeForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
/** /**
* @see routes/web.php:6 * @see routes/web.php:6
* @route '/' * @route '/welcome'
*/ */
homeForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({ homeForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
action: home.url({ action: home.url({
@@ -211,7 +211,81 @@ homeForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
home.form = homeForm home.form = homeForm
/** /**
* @see routes/web.php:11 * @see routes/web.php:10
* @route '/'
*/
export const maintenance = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
url: maintenance.url(options),
method: 'get',
})
maintenance.definition = {
methods: ["get","head"],
url: '/',
} satisfies RouteDefinition<["get","head"]>
/**
* @see routes/web.php:10
* @route '/'
*/
maintenance.url = (options?: RouteQueryOptions) => {
return maintenance.definition.url + queryParams(options)
}
/**
* @see routes/web.php:10
* @route '/'
*/
maintenance.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
url: maintenance.url(options),
method: 'get',
})
/**
* @see routes/web.php:10
* @route '/'
*/
maintenance.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
url: maintenance.url(options),
method: 'head',
})
/**
* @see routes/web.php:10
* @route '/'
*/
const maintenanceForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
action: maintenance.url(options),
method: 'get',
})
/**
* @see routes/web.php:10
* @route '/'
*/
maintenanceForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
action: maintenance.url(options),
method: 'get',
})
/**
* @see routes/web.php:10
* @route '/'
*/
maintenanceForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
action: maintenance.url({
[options?.mergeQuery ? 'mergeQuery' : 'query']: {
_method: 'HEAD',
...(options?.query ?? options?.mergeQuery ?? {}),
}
}),
method: 'get',
})
maintenance.form = maintenanceForm
/**
* @see routes/web.php:15
* @route '/dashboard' * @route '/dashboard'
*/ */
export const dashboard = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ export const dashboard = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
@@ -225,7 +299,7 @@ dashboard.definition = {
} satisfies RouteDefinition<["get","head"]> } satisfies RouteDefinition<["get","head"]>
/** /**
* @see routes/web.php:11 * @see routes/web.php:15
* @route '/dashboard' * @route '/dashboard'
*/ */
dashboard.url = (options?: RouteQueryOptions) => { dashboard.url = (options?: RouteQueryOptions) => {
@@ -233,7 +307,7 @@ dashboard.url = (options?: RouteQueryOptions) => {
} }
/** /**
* @see routes/web.php:11 * @see routes/web.php:15
* @route '/dashboard' * @route '/dashboard'
*/ */
dashboard.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ dashboard.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
@@ -242,7 +316,7 @@ dashboard.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({
}) })
/** /**
* @see routes/web.php:11 * @see routes/web.php:15
* @route '/dashboard' * @route '/dashboard'
*/ */
dashboard.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ dashboard.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
@@ -251,7 +325,7 @@ dashboard.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({
}) })
/** /**
* @see routes/web.php:11 * @see routes/web.php:15
* @route '/dashboard' * @route '/dashboard'
*/ */
const dashboardForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({ const dashboardForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
@@ -260,7 +334,7 @@ const dashboardForm = (options?: RouteQueryOptions): RouteFormDefinition<'get'>
}) })
/** /**
* @see routes/web.php:11 * @see routes/web.php:15
* @route '/dashboard' * @route '/dashboard'
*/ */
dashboardForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({ dashboardForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({
@@ -269,7 +343,7 @@ dashboardForm.get = (options?: RouteQueryOptions): RouteFormDefinition<'get'> =>
}) })
/** /**
* @see routes/web.php:11 * @see routes/web.php:15
* @route '/dashboard' * @route '/dashboard'
*/ */
dashboardForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({ dashboardForm.head = (options?: RouteQueryOptions): RouteFormDefinition<'get'> => ({

View File

@@ -3,10 +3,14 @@
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
use Inertia\Inertia; use Inertia\Inertia;
Route::get('/', function () { Route::get('/welcome', function () {
return Inertia::render('welcome'); return Inertia::render('welcome');
})->name('home'); })->name('home');
Route::get('/', function () {
return Inertia::render('maintenance');
})->name('maintenance');
Route::middleware(['auth', 'verified'])->group(function () { Route::middleware(['auth', 'verified'])->group(function () {
Route::get('dashboard', function () { Route::get('dashboard', function () {
return Inertia::render('dashboard'); return Inertia::render('dashboard');