@discoverworthy/deploy
v1.3.0
Published
Deploy static sites to DiscoverWorthy hosting
Maintainers
Readme
@discoverworthy/deploy
Deploy static sites to DiscoverWorthy hosting and pull blog content managed by your clients.
Works with any framework that outputs static files — React, Next.js, Vue, Angular, Blazor WASM, Hugo, Jekyll, Astro, plain HTML, and more.
Quick Start
export DISCOVERWORTHY_DEPLOY_TOKEN=your-token
# Pull blog posts written by your client, build, and deploy
npx @discoverworthy/deploy pull
npm run build
npx @discoverworthy/deploy --dir=outCommands
deploy (default)
Upload your built site to DiscoverWorthy hosting.
npx @discoverworthy/deploy --dir=outpull
Download published blog posts as MDX files into your content directory. Your client writes posts in the DiscoverWorthy dashboard — this command pulls them into your project so your build can pick them up.
# Pull posts into the default content path (configured in DiscoverWorthy)
npx @discoverworthy/deploy pull
# Pull into a specific directory
npx @discoverworthy/deploy pull --dir=src/content/blog
# Clean existing MDX files before pulling (full sync)
npx @discoverworthy/deploy pull --cleanThe pull command:
- Downloads all published blog posts for your site as
.mdxfiles - Each file includes frontmatter (title, slug, date, topic, excerpt, keywords, cover image)
- Files are named by slug:
my-blog-post.mdx - Defaults to the content path configured in your DiscoverWorthy hosting settings (typically
content/blog)
Typical Workflow
Your client writes blog posts in DiscoverWorthy. You pull them into your project, build, and deploy:
npx @discoverworthy/deploy pull # grab latest posts
npm run build # your framework builds with new posts
npx @discoverworthy/deploy --dir=out # push to hostingAutomate with a prebuild script
Add pull to your package.json so every build includes the latest posts:
{
"scripts": {
"prebuild": "npx @discoverworthy/deploy pull",
"build": "astro build",
"deploy": "npx @discoverworthy/deploy --dir=dist"
}
}CI/CD
GitHub Actions
- name: Pull content & Deploy
env:
DISCOVERWORTHY_DEPLOY_TOKEN: ${{ secrets.DISCOVERWORTHY_DEPLOY_TOKEN }}
run: |
npx @discoverworthy/deploy pull
npm run build
npx @discoverworthy/deploy --dir=outAzure DevOps Pipelines
- script: |
npx @discoverworthy/deploy pull
npm run build
npx @discoverworthy/deploy --dir=out
displayName: 'Pull content, build & deploy'
env:
DISCOVERWORTHY_DEPLOY_TOKEN: $(DISCOVERWORTHY_DEPLOY_TOKEN)Options
| Flag | Default | Description |
|------|---------|-------------|
| --dir | out (deploy) / auto (pull) | Directory for built site output or content pull destination |
| --token | — | Deploy token (or set DISCOVERWORTHY_DEPLOY_TOKEN) |
| --exclude | — | Glob pattern to exclude (deploy only, repeatable) |
| --include-all | — | Disable auto-exclusions and upload everything (deploy only) |
| --clean | — | Remove existing .mdx files before pulling (pull only) |
Smart Defaults
The deploy tool automatically excludes files that aren't needed for hosting:
- Next.js RSC data (
__next.*directories) — prefetch optimization files - Source maps (
*.map) - OS metadata (
.DS_Store,Thumbs.db)
Use --include-all to disable this and upload everything.
Framework Output Directories
| Framework | Build Command | Output Dir |
|-----------|--------------|------------|
| Next.js (static) | next build | out |
| Vite / Vue / Svelte | npm run build | dist |
| React (CRA) | npm run build | build |
| Angular | ng build | dist/<project> |
| Blazor WASM | dotnet publish | release/wwwroot |
| Hugo | hugo | public |
| Astro | astro build | dist |
MDX Frontmatter Format
Pulled blog posts use this frontmatter structure, compatible with most static site frameworks:
---
title: "How to Improve Your SEO Rankings"
slug: "improve-seo-rankings"
date: "2026-03-22"
topic: "SEO"
excerpt: "A practical guide to improving your search rankings."
coverImage: "https://storage.discoverworthy.com/images/cover.webp"
keywords:
- "seo tips"
- "search rankings"
- "organic traffic"
---
Your blog post content in markdown...LLM Prompts for Integration
Use these prompts with your AI coding assistant to wire up blog content quickly:
Astro
Add a content collection for blog posts in
content/blog/. Each post is an MDX file with frontmatter: title (string), slug (string), date (string), topic (string, optional), excerpt (string, optional), coverImage (string URL, optional), keywords (string array, optional). Create a dynamic route at/blog/[slug]that renders the MDX content with a layout showing the title, date, topic, and cover image. Add a/bloglisting page sorted by date descending.
Next.js (App Router)
Create a blog section using MDX files from
content/blog/. Each MDX file has frontmatter: title, slug, date, topic, excerpt, coverImage, keywords. Use gray-matter to parse frontmatter and next-mdx-remote to render content. Create a dynamic route atapp/blog/[slug]/page.tsxand a listing page atapp/blog/page.tsx. Include Open Graph metadata from the frontmatter.
Hugo
Set up a blog section that reads markdown from
content/blog/. Posts have frontmatter: title, slug, date, topic (mapped to a taxonomy), excerpt (used as description), coverImage (used as featured image), keywords. Create a list template atlayouts/blog/list.htmland a single template atlayouts/blog/single.html. Add the blog to the site navigation.
Gatsby
Add a blog using MDX files from
content/blog/. Frontmatter fields: title, slug, date, topic, excerpt, coverImage, keywords. Use gatsby-plugin-mdx and gatsby-source-filesystem. Create pages programmatically in gatsby-node.js using the slug field. Build a blog index page at/blogwith cards showing title, date, excerpt, and cover image.
Get Your Deploy Token
Your deploy token is available in the DiscoverWorthy dashboard under Website Hosting → Connection Details, or ask your client to send you the setup link.
Limits
- Large static exports are supported — the bundle is compressed and streamed directly to storage, not through a request body. Maximum bundle size: 500 MB.
- Supports any static files (HTML, CSS, JS, images, WASM, fonts, etc.)
- Requires Node.js 18+ (uses the built-in
fetchandzlib).
