mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-14 15:54:13 +01:00
Compare commits
10 Commits
33bb54ec5f
...
feat/vuefl
| Author | SHA1 | Date | |
|---|---|---|---|
| 3adf5173e3 | |||
| 5bd407a4ae | |||
| 8e54617c23 | |||
| 830ea37cb0 | |||
| f3d3a507dc | |||
| b476033a97 | |||
| 197c15619e | |||
| 0f02b8609a | |||
| d18b9094d5 | |||
| b3980a2741 |
32
.github/workflows/cloudflare.yml
vendored
32
.github/workflows/cloudflare.yml
vendored
@@ -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
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -117,6 +117,7 @@ export default defineNuxtConfig({
|
||||
|
||||
nitro: {
|
||||
preset: 'cloudflare_module',
|
||||
|
||||
experimental: {
|
||||
openAPI: true
|
||||
},
|
||||
|
||||
5
worker-configuration.d.ts
vendored
5
worker-configuration.d.ts
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user