From 2aa2be0c0a3c2c0e5a1a5ba112978203adf7dbc8 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Thu, 18 Dec 2025 14:02:39 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20ajouter=20la=20configuration=20de=20d?= =?UTF-8?q?=C3=A9ploiement=20dans=20Cloudflare=20et=20mettre=20=C3=A0=20jo?= =?UTF-8?q?ur=20la=20configuration=20Nitro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/cloudflare.yml | 38 ++++++++++++++++++++++++++++++++++++++ nuxt.config.ts | 3 ++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/cloudflare.yml diff --git a/.github/cloudflare.yml b/.github/cloudflare.yml new file mode 100644 index 0000000..30da23f --- /dev/null +++ b/.github/cloudflare.yml @@ -0,0 +1,38 @@ +name: Deploy to Cloudflare Workers + +on: + push: + branches: + - master + +jobs: + deploy: + runs-on: ubuntu-latest + name: Deploy + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Build + run: bun run build + env: + NUXT_PUBLIC_I18N_BASE_URL: ${{ vars.NUXT_PUBLIC_I18N_BASE_URL }} + NUXT_API_URL: ${{ vars.NUXT_API_URL }} + STUDIO_GITHUB_CLIENT_ID: ${{ vars.STUDIO_GITHUB_CLIENT_ID }} + STUDIO_GITHUB_CLIENT_SECRET: ${{ vars.STUDIO_GITHUB_CLIENT_SECRET }} + + - name: Publish to Cloudflare Workers + uses: cloudflare/wrangler-action@v3 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + command: deploy \ No newline at end of file diff --git a/nuxt.config.ts b/nuxt.config.ts index fcc8314..d7c1302 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -102,7 +102,8 @@ export default defineNuxtConfig({ nitro: { preset: 'cloudflare_module', cloudflare: { - nodeCompat: true + nodeCompat: true, + deployConfig: true }, prerender: { routes: ['/'],