Edge Developer Platform
  • Pages
    • Product Introduction
    • Quick Start
      • Importing a Git Repository
      • Starting From a Template
      • Direct Upload
    • Framework Guide
    • Project Guide
      • Project Management
      • edgeone.json
      • Error Codes
    • Build Guide
    • Deployment Guide
      • Overview
      • Create Deploys
      • Manage Deploys
      • Deploy Button
    • Domain Management
      • Overview
      • Custom Domain Name
      • Configuring an HTTPS Certificate
      • How to Configure a DNS CNAME Record
    • Pages Functions
    • KV Storage
    • Edge AI
    • EdgeOne CLI
    • Pages MCP
    • Best Practices
      • 1-Minute Quick Deployment + Free Beta Test in Progress | Your Exclusive DeepSeek, Handled by EdgeOne!
      • Deploy WordPress Gatsby To EdgeOne Pages
      • Build an Ecommerce Platform Using WordPress + GatsbyJS
      • Combining Sanity to Deploy a Portfolio Template
    • Migration Guides
      • Migrating from Vercel to EdgeOne Pages
      • Migrating from Cloudflare Pages to EdgeOne Pages
      • Migrating from Netlify to EdgeOne Pages
    • FAQs
    • Contact Us
    • Release Notes
Unlock 1 Year of EdgeOne + 1TB CDN: Join Our Developer Journey
Get Started Now !

Deploy Button

This section will introduce how to add a one-click deploy button in a GitHub repository, allowing users to quickly deploy your template to EdgeOne Pages.


Deploy Button

The deploy button for Pages is as follows:

Use EdgeOne Pages to deploy


When the user clicks this button, they will be guided to Pages, and your warehouse will be preconfigured as the deployment source.


How to Add a Deploy Button

Add the following markdown code to the README.md file in your repository:
[![Use EdgeOne Pages to deploy](https://cdnstatic.tencentcs.com/edgeone/pages/deploy.svg)](https://edgeone.ai/pages/new?repository-url=YOUR_REPO_URL)

Replace YOUR_REPO_URL with your GitHub repository URL. Subpaths are supported. For example:
[![Use EdgeOne Pages to deploy](https://cdnstatic.tencentcs.com/edgeone/pages/deploy.svg)](https://edgeone.ai/pages/new?repository-url=https%3A%2F%2Fgithub.com%2FTencentEdgeOne%2Fpages-templates%2Ftree%2Fmain%2Fexamples%2Fvue-template)


URL Search Parameter

The deploy button URL supports the following Search parameters:
Search Parameter name
Description
template
Template name deployed by Pages official template
repository-name
Github Repository Name
repository-url
Repository address deployed by other GitHub repositories
project-name
Project Name
build-command
Build command
install-command
Installation command
output-directory
Output directory for post-build products
root-directory
Build root directory
env
Necessary environment variables for the repository. If needed, multiple variables can be connected with English commas, such as: KEY1,KEY2,KEY3.
env-description
Description related to environment variables
env-link
URLs related to environment variables

Notes:
The parameter value needs to be encoded using encodeURIComponent() before being concatenated into the URL. For example, build-command=npm%20run%20build


Examples

For public GitHub repositories:
[![Use EdgeOne Pages to deploy](https://cdnstatic.tencentcs.com/edgeone/pages/deploy.svg)](https://edgeone.ai/pages/new?repository-url=https%3A%2F%2Fgithub.com%2Fusername%2Frepository)

For a specific branch:
[![Use EdgeOne Pages to deploy](https://cdnstatic.tencentcs.com/edgeone/pages/deploy.svg)](https://edgeone.ai/pages/new?repository-url=https%3A%2F%2Fgithub.com%2Fusername%2Frepository%2Ftree%2Fbranch-name)

How to use URL Search Parameter:
[![Use EdgeOne Pages to deploy](https://cdnstatic.tencentcs.com/edgeone/pages/deploy.svg)](https://edgeone.ai/pages/new?repository-url=https%3A%2F%2Fgithub.com%2FTencentEdgeOne%2Fpages-templates%2Ftree%2Fmain%2Fexamples%2Fvue-template&output-directory=.%2Fdist&install-command=npm%20install&build-command=npm%20run%20build)


User experience

When the user clicks the Deploy Button:

1. The page will be redirected to the Pages console.
2. The GitHub repository will be used as the default deployment source.
3. Support adjustments to the project's configuration items.
4. Click "Create". After that, the project will be deployed to Pages.

This provides a seamless experience for users who want to quickly try or deploy your template.


More Configurations

Refer to the edgeone.json document. You can customize the buildCommand, installCommand, and outputDirectory of your project. It is recommended to configure these parameters according to the actual situation of the project to ensure that others can build and deploy your project correctly.