8000 chore(docs): replace broken nuxthub deployment with cloudflare by romhml · Pull Request #216 · romhml/compodium · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@ name: Deploy Docs

on:
push:
branches:
- main
tags:
- v*
- "v*"

jobs:
deploy:
name: "Deploy Docs"
runs-on: ubuntu-latest
environment:
name: ${{ github.ref == 'refs/heads/main' && 'production' || 'preview' }}
name: production
url: ${{ steps.deploy.outputs.deployment-url }}

permissions:
contents: read
id-token: write

defaults:
run:
working-directory: docs
Expand All @@ -31,13 +34,18 @@ jobs:
uses: actions/setup-node@v7
with:
node-version: 24.19.0
cache: 'pnpm'
cache: "pnpm"

- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile

- name: Build docs
run: pnpm build

- name: Build & Deploy to NuxtHub
uses: nuxt-hub/action@v2
- name: Deploy docs to Cloudflare
id: deploy
uses: cloudflare/wrangler-action@v3
with:
project-key: compodium-yt6s
directory: docs/
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: docs
1 change: 1 addition & 0 deletions docs/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default defineNuxtConfig({
},

nitro: {
preset: 'cloudflare_module',
prerender: {
routes: [
'/'
Expand Down
11 changes: 11 additions & 0 deletions docs/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "./node_modules/wrangler/config-schema.json",
"name": "compodium-docs",
"main": "./.output/server/index.mjs",
"assets": {
"directory": "./.output/public",
"binding": "ASSETS"
},
"compatibility_date": "2025-09-01",
"compatibility_flags": ["nodejs_compat"]
}
Loading
0