Skip to content

Commit 426f148

Browse files
adding a deploy button which links to the dashboard (#1888)
Co-authored-by: Phil Hawksworth <phil@deno.com>
1 parent db44f73 commit 426f148

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

_components/CTA.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@
2121
@apply bg-jsr-yellow-400 border-jsr-cyan-950 !text-jsr-cyan-950 border-2
2222
hover:!no-underline hover:bg-jsr-yellow-300;
2323
}
24+
25+
.deploy-button {
26+
padding-left: 3rem;
27+
background-image: url("../deno-deploy.svg");
28+
background-repeat: no-repeat;
29+
background-position: 1rem center;
30+
background-size: 2rem;
31+
}

_components/DeployCTA.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export default function DeployCTA() {
2+
return (
3+
<a
4+
href="https://app.deno.com/"
5+
className="docs-cta deploy-cta deploy-button"
6+
>
7+
Deno Deploy
8+
</a>
9+
);
10+
}
11+
12+
export const css = "@import './_components/CTA.css';";

examples/tutorials/next.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,29 @@ details!
277277

278278
![demo of the app](./images/how-to/next/dinoapp.gif)
279279

280+
## Deploy your app
281+
282+
Now that you have a Next.js app, you can deploy it to the web with Deno
283+
Deploy<sup>EA</sup>. Deno Deploy requires your code to be hosted on GitHub to
284+
access and deploy it, so first you'll need to create a GitHub repository and
285+
push your app there.
286+
287+
[Create a new GitHub repository](https://github.com/new), then initialize and
288+
push your app to GitHub:
289+
290+
```sh
291+
git init -b main
292+
git remote add origin https://github.com/<your_github_username>/<your_repo_name>.git
293+
git add .
294+
git commit -am 'my next app'
295+
git push -u origin main
296+
```
297+
298+
Once your app is on GitHub, you can deploy it on the Deno Deploy<sup>EA</sup>
299+
dashboard:
300+
<a href="https://app.deno.com/" class="docs-cta deploy-cta deploy-button">Deploy
301+
my app</a>
302+
280303
🦕 Now you can build and run a Next.js app with Deno! To build on your app you
281304
could consider [adding a database](/runtime/tutorials/connecting_to_databases/)
282305
to replace your `data.json` file, or consider

styleguide/components.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,15 @@ Call to action button with different colors based on their `type` prop
110110

111111
<comp.CTA href="https://deno.com" type="deploy">Get started</comp.CTA><br/>
112112

113+
## Deploy on Deploy
114+
115+
Call to action button with the Deno Deploy logo. Should be used with additional copy.
116+
```tsx
117+
<comp.DeployCTA />
118+
```
119+
120+
Deploy your application to the edge: <comp.DeployCTA />
121+
113122
## Admonition
114123

115124
A box to highlight information. Must be of type

0 commit comments

Comments
 (0)