This section describes how to add a one-click deployment button to your GitHub repository, enabling users to quickly deploy your template to EdgeOne Makers.
Deploy Button
The Makers deploy button is shown below:
When a user clicks this button, they are redirected to Makers, and your repository is pre-configured as the deployment source.
How to Add a Deploy Button
Add the following Markdown code to your repository's README.md file:
[](https://edgeone.ai/pages/new?repository-url=YOUR_REPO_URL)
Replace YOUR_REPO_URL with your GitHub repository URL. Subpaths are supported. For example:
[](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 via Makers official templates
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
Required environment variables for the repository. If needed, use commas to separate multiple variables, for example, KEY1,KEY2,KEY3.
env-description
Description related to environment variables
env-link
URLs related to environment variables
Notes:
The parameter value needs to use encodeURIComponent() after encoding before being concatenated into the URL, such as build-command=npm%20run%20build.
Examples
For public GitHub repositories:
[](https://edgeone.ai/pages/new?repository-url=https%3A%2F%2Fgithub.com%2Fusername%2Frepository)
For a specific branch:
[](https://edgeone.ai/pages/new?repository-url=https%3A%2F%2Fgithub.com%2Fusername%2Frepository%2Ftree%2Fbranch-name)
How to use URL Search Parameter:
[](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 Makers console.
2. The GitHub repository will be deployed to default.
3. Support adjustments to project configuration items.
4. After Create Now is clicked, the project will be deployed to Makers.
This provides a seamless experience for users who want to quickly try or deploy your template.
More Configurations
Refer to edgeone.json, you can customize the build command, install command and output directory of your project. It is recommended to configure these parameters based on the actual situation to ensure others can correctly build and deploy your project.