Deploy to Deta Button
The Deploy to Deta button provides users a quick way to deploy a public Git repo to a Deta Micro directly from the browser.
It's an easy way to share your creations with the developer community.
You can use the "Deploy To Deta Button" in open-source repositories, blog posts, landing pages etc, allowing other developers to quickly deploy and use your app on Deta.
An example button that deploys a sample Python Micro to Deta:
#
UsageYou can let users deploy your GitHub, Gitlab BitBucket (Git) repo quickly by adding the following markup:
note
Specify the exact branch url if you want to use a different branch for deployment. If you provide the repository url without specifying a branch, the default branch will be used.
The repository must be a public git repository url.
#
Usage with HTML/JavaScriptThe button image is hosted in the following url:
and can be easily added to HTML pages or JavaScript applications. Example usage:
#
Metadata, Environment Variables And CronYou can optionally specify metadata, environment variables and a cron expression needed by the Micro in a deta.json
file. Create this file in the root directory of your application.
The deta.json
file has the following schema:
#
Fieldsname
: the application name, we will use the repositry name by default if this is not provided, users can change this value during deploymentdescription
: the application description which will be shown to users on the deployment pageruntime
: the micro's runtime, the default runtime (python3.9
ornodejs14.x
) will be used unless this value is set, supported values:Python
:python3.7
,python3.8
,python3.9
Nodejs
:nodejs12.x
,nodejs14.x
env
: the environment variables your app useskey
: the environment variable key, users cannot change this valuedescription
: the description of the environment variable so users know what it is used forvalue
: the default value of this variable, users can change this valuerequired
: if the value of this variable must be set by the user
cron
: the default cron expression for the micro, if this is provided the deployed micro will have a cron job set with the provided value by default, users can change the value during deployment
You can test your deta.json
file by visiting https://go.deta.dev/deploy?repo=your-repo-url
#
Get discoveredMake sure to add the deta
tag to your repo for it to show up in our GitHub topic.

#
IssuesIf you run into any issues, consider reporting them in our Github Discussions.