You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/adding-custom-one-click-deploy.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,13 @@ sidebar_position: 800
4
4
description: Add a custom 1-Click Deploy link to deploy your own app.
5
5
---
6
6
7
+
import { URLProvider, URLEncode } from "../../src/components/OneClick";
8
+
9
+
<URLProvider>
10
+
7
11
# Adding Custom 1-Click Deploy to Your App
8
12
9
-
This tutorial will show you how to add a 1-Click Deploy link to deploy your app to the Defang Playground.
13
+
This tutorial will show you how to add a 1-Click Deploy link to deploy your app to the Defang Playground so that other people can easily deploy your app.
10
14
11
15
The link is often placed as a button in the `README.md` file of your project repository, and is the easiest way to allow anyone to deploy your app.
12
16
@@ -83,12 +87,16 @@ You will need the encoded version of the URL of the page from the previous step.
2. You can go online and paste the URL from the step above into a URL encoder tool of your choice. You should end up with an encoded URL, similar to the one shown below:
90
+
2. You need to URL encode your url for the next step. For example, the url above would be encoded as:
You can just paste your url in here to get the encoded version:
97
+
98
+
<URLEncode />
99
+
92
100
## Step 5 - Create the 1-Click Deploy Link
93
101
94
102
You will need to create a 1-Click Deploy link with the following format: `https://portal.defang.dev/redirect?url=` + your encoded URL. This ensures that the user can get [logged in](/docs/concepts/authentication/) to Defang before they get redirected to clone your app for deployment.
@@ -113,3 +121,5 @@ Or perhaps you can add it to a button with your own styling:
0 commit comments