mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-14 13:54:05 +01:00
Compare commits
10 Commits
ac46398a9d
...
ab0ad65d5e
| Author | SHA1 | Date | |
|---|---|---|---|
| ab0ad65d5e | |||
| 4bbf401636 | |||
| dc04539d1e | |||
| 2ffffe3e32 | |||
| 55b79f0dc2 | |||
| 80c88466d3 | |||
| 59bcfbd248 | |||
| 041c25d1fd | |||
| 442cab6026 | |||
| 2e5cdde145 |
17
.github/workflows/cloudflare.yml
vendored
17
.github/workflows/cloudflare.yml
vendored
@@ -1,9 +1,14 @@
|
||||
name: Deploy to Cloudflare Workers
|
||||
name: Deploy to Cloudflare Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- '**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
deployments: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
@@ -35,12 +40,14 @@ jobs:
|
||||
STUDIO_GITHUB_CLIENT_ID: ${{ vars.STUDIO_GITHUB_CLIENT_ID }}
|
||||
STUDIO_GITHUB_CLIENT_SECRET: ${{ vars.STUDIO_GITHUB_CLIENT_SECRET }}
|
||||
|
||||
- name: Publish to Cloudflare Workers
|
||||
- name: Publish to Cloudflare Pages
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: pages deploy
|
||||
command: pages deploy --branch=${{ env.BRANCH_NAME }}
|
||||
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
env:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||
@@ -5,9 +5,11 @@ import { activityMessages, IDEs } from '~~/types'
|
||||
|
||||
const { locale, locales, t } = useI18n({ useScope: 'local' })
|
||||
|
||||
const { data: activity, refresh } = await useAsyncData<Activity>('activity', () => $fetch('/api/activity'))
|
||||
const { data: activity, refresh } = await useAsyncData<Activity>('activity', () => $fetch('/api/activity'),
|
||||
{ lazy: true }
|
||||
)
|
||||
|
||||
useIntervalFn(refresh, 5000)
|
||||
useIntervalFn(refresh, 1000)
|
||||
|
||||
const codingActivities = computed(() => {
|
||||
const list = activity.value?.data.activities ?? []
|
||||
|
||||
13
app/pages/chat.vue
Normal file
13
app/pages/chat.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<script lang="ts" setup>
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
CHAT
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -73,13 +73,6 @@ export default defineNuxtConfig({
|
||||
|
||||
i18n: {
|
||||
strategy: 'no_prefix',
|
||||
compilation: {
|
||||
strictMessage: false,
|
||||
},
|
||||
bundle: {
|
||||
fullInstall: false,
|
||||
dropMessageCompiler: true,
|
||||
},
|
||||
locales: [
|
||||
{
|
||||
label: 'English',
|
||||
@@ -103,8 +96,22 @@ export default defineNuxtConfig({
|
||||
defaultLocale: 'en',
|
||||
},
|
||||
|
||||
routeRules: {
|
||||
'/api/activity': {
|
||||
proxy: `${process.env.NUXT_API_URL}/api/activity`
|
||||
},
|
||||
'/api/stats': {
|
||||
proxy: `${process.env.NUXT_API_URL}/api/stats`
|
||||
}
|
||||
},
|
||||
|
||||
nitro: {
|
||||
preset: 'cloudflare_pages',
|
||||
|
||||
prerender: {
|
||||
routes: ['/'],
|
||||
crawlLinks: true,
|
||||
}
|
||||
},
|
||||
|
||||
runtimeConfig: {
|
||||
@@ -117,4 +124,8 @@ export default defineNuxtConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
experimental: {
|
||||
viewTransition: true
|
||||
},
|
||||
})
|
||||
@@ -1,4 +0,0 @@
|
||||
export default defineEventHandler(async (event) => {
|
||||
const config = useRuntimeConfig(event)
|
||||
return await $fetch(`${config.api.url}/api/activity`)
|
||||
})
|
||||
@@ -1,4 +0,0 @@
|
||||
export default defineEventHandler(async (event) => {
|
||||
const config = useRuntimeConfig(event)
|
||||
return await $fetch(`${config.api.url}/api/stats`)
|
||||
})
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "../.nuxt/tsconfig.server.json"
|
||||
}
|
||||
@@ -1,3 +1,17 @@
|
||||
{
|
||||
"extends": "./.nuxt/tsconfig.json"
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./.nuxt/tsconfig.app.json"
|
||||
},
|
||||
{
|
||||
"path": "./.nuxt/tsconfig.server.json"
|
||||
},
|
||||
{
|
||||
"path": "./.nuxt/tsconfig.shared.json"
|
||||
},
|
||||
{
|
||||
"path": "./.nuxt/tsconfig.node.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -123,21 +123,6 @@ export const activityMessages: Record<'en' | 'fr' | 'es', ActivityMessages> = {
|
||||
},
|
||||
}
|
||||
|
||||
export interface Tag {
|
||||
label: string
|
||||
title?: string
|
||||
translation: string
|
||||
}
|
||||
|
||||
export const TAGS: readonly Tag[] = [
|
||||
{ label: 'R', translation: 'tags.r' },
|
||||
{ label: 'AI', translation: 'tags.ai' },
|
||||
{ label: 'Data', translation: 'tags.data' },
|
||||
{ label: 'Web', translation: 'tags.web' },
|
||||
{ label: 'Python', translation: 'tags.python' },
|
||||
{ label: 'Maths', translation: 'tags.maths' },
|
||||
] as const
|
||||
|
||||
export const socials = [
|
||||
{ icon: 'i-ph-x-logo-duotone', label: 'Twitter', to: 'https://twitter.com/ArthurDanj' },
|
||||
{ icon: 'i-ph-github-logo-duotone', label: 'GitHub', to: 'https://github.com/ArthurDanjou' },
|
||||
@@ -156,6 +141,7 @@ interface Nav {
|
||||
|
||||
export const navs: readonly Nav[] = [
|
||||
{ label: { en: 'home', fr: 'accueil', es: 'inicio' }, to: '/', icon: 'house-duotone' },
|
||||
{ label: { en: 'chat', fr: 'chat', es: 'chat' }, to: '/chat', icon: 'chat-circle-dots-duotone' },
|
||||
{
|
||||
label: { en: 'resume', fr: 'cv', es: 'currículum' },
|
||||
icon: 'address-book-duotone',
|
||||
|
||||
14
worker-configuration.d.ts
vendored
14
worker-configuration.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable */
|
||||
// Generated by Wrangler by running `wrangler types` (hash: 889e96b9a6e7cd90ad202f69774b6cc7)
|
||||
// Runtime types generated with workerd@1.20251217.0 2025-12-13 nodejs_compat
|
||||
// Generated by Wrangler by running `wrangler types` (hash: 9ebceff030e512b05e46edbb174bea44)
|
||||
// Runtime types generated with workerd@1.20251217.0 2025-12-13
|
||||
declare namespace Cloudflare {
|
||||
interface Env {
|
||||
CACHE: KVNamespace;
|
||||
@@ -12,12 +12,6 @@ declare namespace Cloudflare {
|
||||
}
|
||||
}
|
||||
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, "NUXT_PUBLIC_I18N_BASE_URL" | "NUXT_API_URL" | "STUDIO_GITHUB_CLIENT_ID" | "STUDIO_GITHUB_CLIENT_SECRET">> {}
|
||||
}
|
||||
|
||||
// Begin runtime types
|
||||
/*! *****************************************************************************
|
||||
@@ -8599,7 +8593,7 @@ type AIGatewayHeaders = {
|
||||
[key: string]: string | number | boolean | object;
|
||||
};
|
||||
type AIGatewayUniversalRequest = {
|
||||
provider: AIGatewayProviders | string; // eslint-disable-line
|
||||
provider: AIGatewayProviders | string;
|
||||
endpoint: string;
|
||||
headers: Partial<AIGatewayHeaders>;
|
||||
query: unknown;
|
||||
@@ -8615,7 +8609,7 @@ declare abstract class AiGateway {
|
||||
gateway?: UniversalGatewayOptions;
|
||||
extraHeaders?: object;
|
||||
}): Promise<Response>;
|
||||
getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
|
||||
getUrl(provider?: AIGatewayProviders | string): Promise<string>;
|
||||
}
|
||||
interface AutoRAGInternalError extends Error {
|
||||
}
|
||||
|
||||
@@ -2,12 +2,7 @@
|
||||
"$schema": "node_modules/wrangler/config-schema.json",
|
||||
"name": "artsite",
|
||||
"compatibility_date": "2025-12-13",
|
||||
"compatibility_flags": [
|
||||
"nodejs_compat"
|
||||
],
|
||||
"placement": {
|
||||
"mode": "smart"
|
||||
},
|
||||
"pages_build_output_dir": "dist/public",
|
||||
"d1_databases": [
|
||||
{
|
||||
"binding": "DB",
|
||||
@@ -19,5 +14,9 @@
|
||||
"binding": "CACHE",
|
||||
"id": "f0766ace1d24423ba6e5cac4fb8f2054"
|
||||
}
|
||||
]
|
||||
],
|
||||
"ai": {
|
||||
"binding": "AI",
|
||||
"remote": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user