Deploy on Pantheon
Pantheon's Next.js Beta hosting supports deploying Next.js frontends with Lupus Decoupled Drupal. Since the platform uses a framework-agnostic Node.js build pipeline under the hood, Nuxt frontends also work.
Prerequisites
- A Pantheon workspace with Next.js Beta access enabled
- A Drupal site with lupus_decoupled installed and the custom elements API working
- A GitHub account connected to your Pantheon workspace
Step 1: Create the frontend site on Pantheon
- Go to Pantheon Dashboard → Add Site → Next.js
- Choose "Create new repository"
- Wait for the initial template deployment to succeed
- Note the GitHub repo that was created (e.g.
your-org/your-site-name)
Step 2: Prepare your frontend
Clone a Lupus Decoupled frontend starter:
git clone https://github.com/drunomics/lupus-decoupled-nuxt-starter.git my-frontend
Configure it to point at your Pantheon Drupal backend. The recommended approach is to set the Drupal base URL as an environment variable on Pantheon via Dashboard → Settings → Environment Variables (only available after the first successful deployment):
NUXT_PUBLIC_DRUPAL_CE_DRUPAL_BASE_URL=https://dev-your-drupal-site.pantheonsite.io
Alternatively, you can set the base URL directly in the framework config:
export default defineNuxtConfig({
modules: ['nuxtjs-drupal-ce'],
drupalCe: {
drupalBaseUrl: 'https://dev-your-drupal-site.pantheonsite.io',
},
})
nuxtjs-drupal-ce options can be overridden at runtime via NUXT_PUBLIC_DRUPAL_CE_* environment variables. See the nuxtjs-drupal-ce documentation for details.Step 3: Push to Pantheon
Push your frontend code to the GitHub repo Pantheon created:
cd my-frontend
rm -rf .git
git init && git add -A && git commit -m "Initial deploy"
git remote add origin git@github.com:your-org/your-pantheon-repo.git
git branch -m main
git push --force origin main
Step 4: Wait for the build
Pantheon builds automatically on push. This typically takes 5–10 minutes.
You can check deployment status via the GitHub API:
gh api repos/your-org/your-repo/deployments --jq '.[0].statuses_url' | xargs gh api --jq '.[0].state'
Step 5: Verify
Visit https://dev-your-frontend-site.pantheonsite.io/. You may need to click through Pantheon's sandbox page on first visit. Your Drupal content should render through the frontend.
Node.js version
Pantheon auto-detects the Node.js version from the engines field in package.json. If not specified, it defaults to Node.js LTS (currently v22).
{
"engines": {
"node": ">=22"
}
}