Tutorials

How to Publish an OpenCode Project in 5 Minutes

Publish a static website or landing page from OpenCode with Deplion, connect a working contact form, collect leads, and keep updating the project from the same agent workflow.

If OpenCode has already built your website, you can keep the publishing step inside the same agent workflow.

OpenCode supports remote MCP servers over Streamable HTTP. Once Deplion is connected, OpenCode can work with the current project and use Deplion to publish it, connect a lead form, publish later changes, and retrieve incoming inquiries.

The short version: connect Deplion to OpenCode, open your project, and ask OpenCode to publish the current website.

Before you start

You need:

This works best for frontend projects made from HTML, CSS, JavaScript, images, and other browser assets.

Step 1: Connect Deplion to OpenCode

OpenCode can connect to remote MCP servers from its configuration.

A remote server uses a configuration similar to:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "servers": {
      "deplion": {
        "type": "remote",
        "url": "YOUR_DEPLION_MCP_URL"
      }
    }
  }
}

Use the endpoint and authorization details provided by Deplion.

After the connection is available, start OpenCode in the website project and confirm that Deplion tools are available to the agent.

Step 2: Finish the website

Work on the page as usual.

For example:

Review this landing page on desktop and mobile. Fix obvious layout issues and broken interactions, but keep the existing visual style.

Then inspect the result yourself before publishing.

Step 3: Ask OpenCode to publish the project

When the website is ready, ask:

Publish the current website with Deplion and give me the public URL.

OpenCode already has the project context. Deplion adds the publishing actions.

When the operation finishes, open the returned URL and compare the public version with the version you reviewed locally.

Step 4: Connect the contact form

If your page already contains a form, ask:

Make the existing contact form collect leads through Deplion. Keep the current design and fields, then publish the updated version.

The form can collect normal business information such as name, email, phone, company, service, or message.

The point is to make the published page useful as a real landing page rather than leaving the form as a visual placeholder.

Step 5: Test the lead flow

Open the public website and submit a test inquiry yourself.

Then ask OpenCode:

Show me the latest lead from this project.

If the test submission appears, the visitor-to-lead flow is working.

Step 6: Publish future changes

Continue editing in OpenCode normally.

For example:

Add a testimonial section below the services block and make sure it works on mobile.

After reviewing it:

Publish the updated version.

You can repeat this for copy changes, pricing, images, new sections, calls to action, and design fixes.

If an AI edit goes wrong

If a later change produces a worse public version, ask:

Roll back this project to the previous published version.

That is a cleaner recovery path than trying to recreate the old state from chat history.

One prompt worth saving

Publish this website with Deplion. Preserve the existing design. Make the current contact form collect leads, check that all required assets are included, verify desktop and mobile, publish the finished version, and give me the public URL.

Common problems

OpenCode does not see Deplion

Check the OpenCode MCP configuration and confirm that the remote server is enabled and the URL is correct.

If authentication is required, complete the authorization flow or add the required connection details from Deplion.

The public page is missing assets

Ask:

Compare the published website with the current project. Fix missing styles, scripts, images, or assets without redesigning the page, then publish the corrected version.

The contact form does not create a lead

Ask OpenCode to verify the Deplion form connection, republish the page, and then submit another test yourself.

The project has a backend

Deplion is intended for static websites and landing pages. A project that depends on its own server-side runtime, database, or authentication backend needs a separate solution for that backend.

Do I need GitHub first?

No. If OpenCode already has access to the project and Deplion is connected, GitHub is not a required intermediate step for publication.

Key takeaways

The end result is a public website that stays connected to the same AI workflow you already use to build and maintain it.