mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-14 15:54:13 +01:00
feat: mettre à jour la configuration de déploiement pour Cloudflare Workers et ajouter des paramètres d'observabilité
This commit is contained in:
6
.github/workflows/cloudflare.yml
vendored
6
.github/workflows/cloudflare.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Deploy to Cloudflare Pages
|
||||
name: Deploy to Cloudflare Workers
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -48,12 +48,12 @@ jobs:
|
||||
STUDIO_GITHUB_CLIENT_ID: ${{ secrets.STUDIO_GITHUB_CLIENT_ID }}
|
||||
STUDIO_GITHUB_CLIENT_SECRET: ${{ secrets.STUDIO_GITHUB_CLIENT_SECRET }}
|
||||
|
||||
- name: Publish to Cloudflare Pages
|
||||
- name: Publish to Cloudflare Workers
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: pages deploy --branch=${{ env.BRANCH_NAME }}
|
||||
command: deploy --branch=${{ env.BRANCH_NAME }}
|
||||
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
env:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
|
||||
25
worker-configuration.d.ts
vendored
25
worker-configuration.d.ts
vendored
@@ -1,18 +1,29 @@
|
||||
/* eslint-disable */
|
||||
// Generated by Wrangler by running `wrangler types` (hash: 7333ef017a5016b51354dce96a893062)
|
||||
// Runtime types generated with workerd@1.20251217.0 2025-12-13
|
||||
// Generated by Wrangler by running `wrangler types` (hash: 730a20d40c88c8f7167cb4afae90a541)
|
||||
// Runtime types generated with workerd@1.20251217.0 2025-12-13 nodejs_compat
|
||||
declare namespace Cloudflare {
|
||||
interface Env {
|
||||
CACHE: KVNamespace;
|
||||
NUXT_PUBLIC_I18N_BASE_URL: string;
|
||||
NUXT_API_URL: string;
|
||||
STUDIO_GITHUB_CLIENT_ID: string;
|
||||
STUDIO_GITHUB_CLIENT_SECRET: string;
|
||||
NUXT_DISCORD_USER_ID: string;
|
||||
NUXT_WAKATIME_CODING: string;
|
||||
NUXT_WAKATIME_EDITORS: string;
|
||||
NUXT_WAKATIME_LANGUAGES: string;
|
||||
NUXT_WAKATIME_OS: string;
|
||||
NUXT_WAKATIME_USER_ID: string;
|
||||
NUXT_STATUS_PAGE: string;
|
||||
DB: D1Database;
|
||||
AI: Ai;
|
||||
ASSETS: Fetcher;
|
||||
}
|
||||
}
|
||||
interface Env extends Cloudflare.Env {}
|
||||
type StringifyValues<EnvType extends Record<string, unknown>> = {
|
||||
[Binding in keyof EnvType]: EnvType[Binding] extends string ? EnvType[Binding] : string;
|
||||
};
|
||||
declare namespace NodeJS {
|
||||
interface ProcessEnv extends StringifyValues<Pick<Cloudflare.Env, "STUDIO_GITHUB_CLIENT_ID" | "STUDIO_GITHUB_CLIENT_SECRET" | "NUXT_DISCORD_USER_ID" | "NUXT_WAKATIME_CODING" | "NUXT_WAKATIME_EDITORS" | "NUXT_WAKATIME_LANGUAGES" | "NUXT_WAKATIME_OS" | "NUXT_WAKATIME_USER_ID" | "NUXT_STATUS_PAGE">> {}
|
||||
}
|
||||
|
||||
// Begin runtime types
|
||||
/*! *****************************************************************************
|
||||
@@ -8594,7 +8605,7 @@ type AIGatewayHeaders = {
|
||||
[key: string]: string | number | boolean | object;
|
||||
};
|
||||
type AIGatewayUniversalRequest = {
|
||||
provider: AIGatewayProviders | string;
|
||||
provider: AIGatewayProviders | string; // eslint-disable-line
|
||||
endpoint: string;
|
||||
headers: Partial<AIGatewayHeaders>;
|
||||
query: unknown;
|
||||
@@ -8610,7 +8621,7 @@ declare abstract class AiGateway {
|
||||
gateway?: UniversalGatewayOptions;
|
||||
extraHeaders?: object;
|
||||
}): Promise<Response>;
|
||||
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
||||
getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
|
||||
}
|
||||
interface AutoRAGInternalError extends Error {
|
||||
}
|
||||
|
||||
@@ -2,7 +2,26 @@
|
||||
"$schema": "node_modules/wrangler/config-schema.json",
|
||||
"name": "artsite",
|
||||
"compatibility_date": "2025-12-13",
|
||||
"pages_build_output_dir": "dist/public",
|
||||
"compatibility_flags": [
|
||||
"nodejs_compat",
|
||||
],
|
||||
"preview_urls": true,
|
||||
"workers_dev": true,
|
||||
"main": "./.output/server/index.mjs",
|
||||
"routes": [
|
||||
{
|
||||
"pattern": "v2.arthurdanjou.fr",
|
||||
"zone_name": "arthurdanjou.fr",
|
||||
"custom_domain": true
|
||||
}
|
||||
],
|
||||
"placement": {
|
||||
"mode": "smart",
|
||||
},
|
||||
"assets": {
|
||||
"binding": "ASSETS",
|
||||
"directory": "./.output/public/"
|
||||
},
|
||||
"d1_databases": [
|
||||
{
|
||||
"binding": "DB",
|
||||
@@ -15,8 +34,18 @@
|
||||
"id": "f0766ace1d24423ba6e5cac4fb8f2054"
|
||||
}
|
||||
],
|
||||
"ai": {
|
||||
"binding": "AI",
|
||||
"remote": true
|
||||
"observability": {
|
||||
"enabled": true,
|
||||
"logs": {
|
||||
"enabled": true,
|
||||
"head_sampling_rate": 1,
|
||||
"persist": true,
|
||||
"invocation_logs": true
|
||||
},
|
||||
"traces": {
|
||||
"enabled": true,
|
||||
"head_sampling_rate": 1,
|
||||
"persist": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user