10 Commits

4 changed files with 24 additions and 16 deletions

View File

@@ -31,6 +31,8 @@ jobs:
uses: cloudflare/wrangler-action@v3
with:
command: types
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- name: Build
run: bun run build
@@ -44,25 +46,32 @@ jobs:
NUXT_STATUS_PAGE: ${{ secrets.NUXT_STATUS_PAGE }}
STUDIO_GITHUB_CLIENT_ID: ${{ secrets.STUDIO_GITHUB_CLIENT_ID }}
STUDIO_GITHUB_CLIENT_SECRET: ${{ secrets.STUDIO_GITHUB_CLIENT_SECRET }}
STUDIO_GITHUB_MODERATORS: ${{ secrets.STUDIO_GITHUB_MODERATORS }}
- name: Determine Deployment Target
- name: Determine Deployment Command
id: target
run: |
if [ "${{ github.ref_name }}" = "main" ] || [ "${{ github.ref_name }}" = "master" ]; then
echo "env_flag=" >> $GITHUB_OUTPUT
echo "wrangler_command=deploy" >> $GITHUB_OUTPUT
echo "env_name=Production" >> $GITHUB_OUTPUT
else
echo "env_flag=--env preview" >> $GITHUB_OUTPUT
echo "wrangler_command=versions upload" >> $GITHUB_OUTPUT
echo "env_name=Preview" >> $GITHUB_OUTPUT
fi
- name: Publish to Cloudflare Workers
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: deploy ${{ steps.target.outputs.env_flag }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Run Cloudflare Wrangler & Capture URL
id: wrangler
run: |
# Exécuter wrangler et rediriger la sortie vers un fichier tout en l'affichant (tee)
bunx wrangler ${{ steps.target.outputs.wrangler_command }} | tee wrangler.log
# Extraction de l'URL
if [ "${{ steps.target.outputs.env_name }}" = "Preview" ]; then
PREVIEW_URL=$(grep -o 'https://[^ ]*\.workers\.dev' wrangler.log | head -n 1)
echo "DEPLOY_URL=$PREVIEW_URL" >> $GITHUB_OUTPUT
else
echo "DEPLOY_URL=https://arthurdanjou.fr" >> $GITHUB_OUTPUT
fi
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
@@ -77,7 +86,8 @@ jobs:
title: "Déploiement Portfolio (${{ steps.target.outputs.env_name }})"
description: |
Build terminé sur la branche **${{ github.ref_name }}**.
Environnement cible : **${{ steps.target.outputs.env_name }}**.
Environnement : **${{ steps.target.outputs.env_name }}**
URL : **${{ steps.wrangler.outputs.DEPLOY_URL }}**
Commit: `${{ github.sha }}` par ${{ github.actor }}.
nofail: false
nodetail: false

View File

@@ -10,7 +10,7 @@ useSeoMeta({
<main class="min-h-[60vh] flex flex-col items-center justify-center p-4">
<div class="max-w-2xl text-center space-y-8">
<h1 class="p-2 text-4xl md:text-6xl font-bold bg-linear-to-r from-inverted/40 to-inverted/75 to-70% bg-clip-text text-transparent duration-200 my-12 md:my-24">
Coming Soon...
Coming Soon... Very Soon...
</h1>
<p class="text-lg md:text-xl text-neutral-600 dark:text-neutral-400 leading-relaxed">

View File

@@ -117,6 +117,7 @@ export default defineNuxtConfig({
nitro: {
preset: 'cloudflare_module',
experimental: {
openAPI: true
},

View File

@@ -1,10 +1,7 @@
/* eslint-disable */
// Generated by Wrangler by running `wrangler types` (hash: 8c48032b4b2801cdbac6e8dbc9d26203)
// Generated by Wrangler by running `wrangler types` (hash: 373e9a05bf207b93549ab53665d07e4b)
// Runtime types generated with workerd@1.20251210.0 2025-12-13 nodejs_compat
declare namespace Cloudflare {
interface GlobalProps {
mainModule: typeof import("./.output/server/index");
}
interface Env {
CACHE: KVNamespace;
STUDIO_GITHUB_CLIENT_ID: string;