Skip to content

Commit 0418470

Browse files
initial commit for EA docs (#1702)
Co-authored-by: Phil Hawksworth <phil@deno.com>
1 parent f2aa2ee commit 0418470

File tree

20 files changed

+523
-25
lines changed

20 files changed

+523
-25
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: denoland/setup-deno@v2
14+
with:
15+
deno-version: "2.3.1"
1416

1517
- run: deno fmt --check
1618
- run: deno task test

_components/CTA.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.docs-cta {
2-
@apply border text-balance text-black font-bold inline-block py-3.5 px-6 mr-4
3-
rounded-full w-max hover:no-underline transition-colors duration-200 mb-6;
2+
@apply border text-balance text-black font-bold inline-block py-3.5 px-6
3+
rounded-full w-max hover:no-underline transition-colors duration-200 m-4
4+
ml-0;
45
}
56

67
.runtime-cta,

_components/Navigation.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,21 @@ function getSectionData(data: Lume.Data, currentUrl: string) {
4646
return sectionData;
4747
}
4848

49-
const dataPath = currentUrl?.split("/")[1];
49+
// Extract path segments from the URL
50+
const urlSegments = currentUrl.split("/").filter(Boolean);
51+
52+
// Check for more specific sidebar data first (like /deploy/early-access/)
53+
if (urlSegments.length > 1) {
54+
const specificPath = `/${urlSegments[0]}/${urlSegments[1]}/`;
55+
const specificSidebar = data.search.data(specificPath)?.sidebar;
56+
57+
if (specificSidebar) {
58+
return specificSidebar;
59+
}
60+
}
61+
62+
// Fall back to the default behavior using just the first segment
63+
const dataPath = urlSegments[0];
5064
return data.search.data(`/${dataPath}/`)?.sidebar;
5165
}
5266

_components/Sidebar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function SidebarSection(
102102
)
103103
)}{" "}
104104
<ul aria-labelledby={categoryTitle} class="mb-4">
105-
{props.section.items.map((item) => (
105+
{props.section.items?.map((item) => (
106106
<li class="mx-2">
107107
{typeof item === "object" && "items" in item
108108
? (
@@ -169,7 +169,7 @@ function SidebarCategory(props: {
169169
search: Searcher;
170170
url: string;
171171
}) {
172-
const containsCurrent = props.item.items.some((item) => {
172+
const containsCurrent = props.item.items?.some((item) => {
173173
if (typeof item === "string") {
174174
return item === props.url;
175175
}
@@ -203,7 +203,7 @@ function SidebarCategory(props: {
203203
class={`ml-2 ${containsCurrent ? "" : "hidden"}`}
204204
data-accordion-content
205205
>
206-
{props.item.items.map((item) => (
206+
{props.item.items?.map((item) => (
207207
typeof item === "object" && "items" in item
208208
? (
209209
<SidebarCategory

_config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import toc from "https://deno.land/x/lume_markdown_plugins@v0.7.0/toc.ts";
2020
import { CSS as GFM_CSS } from "https://jsr.io/@deno/gfm/0.8.2/style.ts";
2121
import { log } from "lume/core/utils/log.ts";
2222
import anchor from "npm:markdown-it-anchor@9";
23-
import { full as emoji } from "npm:markdown-it-emoji@3";
2423
import admonitionPlugin from "./markdown-it/admonition.ts";
2524
import codeblockCopyPlugin from "./markdown-it/codeblock-copy.ts";
2625
import codeblockTitlePlugin from "./markdown-it/codeblock-title.ts";
@@ -63,7 +62,6 @@ const site = lume(
6362
markdown: {
6463
plugins: [
6564
replacerPlugin,
66-
emoji,
6765
admonitionPlugin,
6866
codeblockCopyPlugin,
6967
codeblockTitlePlugin,
@@ -108,6 +106,7 @@ site.copy("static", ".");
108106
site.copy("timeUtils.ts");
109107
site.copy("subhosting/api/images");
110108
site.copy("deploy/docs-images");
109+
site.copy("deploy/images");
111110
site.copy("deploy/kv/manual/images");
112111
site.copy("deploy/tutorials/images");
113112
site.copy("deploy/kv/tutorials/images");
@@ -117,6 +116,7 @@ site.copy("runtime/reference/images");
117116
site.copy("runtime/contributing/images");
118117
site.copy("examples/tutorials/images");
119118
site.copy("deploy/manual/images");
119+
site.copy("deploy/early-access/images");
120120
site.copy("deno.json");
121121
site.copy("go.json");
122122
site.copy("oldurls.json");

deno.lock

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy/early-access/_data.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { Sidebar } from "../../types.ts";
2+
3+
export const sidebar = [
4+
{
5+
title: "About Early Access",
6+
href: "/deploy/early-access/",
7+
},
8+
{
9+
title: "Getting started",
10+
href: "/deploy/early-access/getting_started/",
11+
items: [
12+
{
13+
title: "Reference guide",
14+
href: "/deploy/early-access/reference/",
15+
},
16+
{
17+
title: "Usage and Limitations",
18+
href: "/deploy/early-access/usage/",
19+
},
20+
{
21+
title: "Support",
22+
href: "/deploy/early-access/support/",
23+
},
24+
],
25+
},
26+
] satisfies Sidebar;
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
---
2+
title: "Getting started"
3+
description: "Step-by-step guide to creating and configuring your first Deno Deploy Early Access application, including organization setup, build configuration, environment variables, and deployment monitoring."
4+
---
5+
6+
:::caution
7+
8+
Deno Deploy EA is in private access. You must be explicitly granted permission
9+
to use it, otherwise you will be unable to visit the new dashboard.
10+
11+
:::
12+
13+
## Create an organization
14+
15+
To get started with Deno Deploy EA, you must first create a Deno Deploy EA
16+
organization. You can do this by visiting [app.deno.com](http://app.deno.com).
17+
18+
Upon first visiting the dashboard, you’ll be greeted by the Deno Deploy EA
19+
organization creation screen:
20+
21+
![The Deno Deploy EA organization creation screen.](./images/create_org.png)
22+
23+
You can not currently create an organization that has the same slug as any
24+
project name in Deno Deploy Classic.
25+
26+
Currently, the organization name and organization slug can not be changed after
27+
organization creation.
28+
29+
## Create an app
30+
31+
After creating an organization, you will be redirected to the organization apps
32+
page, where you can see the list of all organizations in the app. From here you
33+
can navigate to the organization settings, and the custom domains list which
34+
manages the custom domains attached to your organization.
35+
36+
To create an app, press the `+ New App` button:
37+
38+
![Screenshot of deploy app creation screen](./images/create_app.png)
39+
40+
An application is a single deployed web service with one build configuration,
41+
build history, environment variables, attached custom domains, a linked GitHub
42+
repository, etc.
43+
44+
## Select a repo
45+
46+
![Screenshot of deploy org selection screen](./images/select_org.png)
47+
48+
Next, you will need to select the GitHub repository to deploy your app code
49+
from. At time of writing, you must deploy from a GitHub repository.
50+
51+
If your repository does not show up, use the `Add another GitHub account` or
52+
`Configure GitHub App permissions` buttons in the user/org, or repo dropdowns to
53+
grant the Deno Deploy GitHub app permission to deploy your repositories.
54+
55+
> ⏳ We do not yet support deploying mono-repos (for examples, repos where the
56+
> actual application lives entirely in a subdirectory).
57+
58+
## Configure your app
59+
60+
After selecting a GitHub repository, Deno Deploy EA will automatically attempt
61+
to detect the kind of application you are deploying and determine appropriate
62+
build configuration. You can see the detected configuration in the `App Config`
63+
box on the top right.
64+
65+
![Screenshot of Deploy application configuration screen](./images/app_config.png)
66+
67+
If the build configuration was incorrectly detected, or you want to make changes
68+
to it, click the `Edit build config` button to open the build config drawer.
69+
70+
![Screenshot of Deploy build configuration screen](./images/build_config.png)
71+
72+
## Configure your build
73+
74+
In the build config drawer you can edit the framework preset. If you are not
75+
using a framework, or are using a framework that is not in the list, select
76+
`No Preset`.
77+
78+
You can then edit multiple options depending on what preset you have selected:
79+
80+
### install command
81+
82+
If you need to install dependencies before running the build command, such as
83+
`npm install`, `deno install`, or similar, enter this command here. If you are
84+
deploying a Deno application that does not have a `package.json`, you can
85+
usually leave this empty.
86+
87+
### Build command
88+
89+
The command to execute to take your source code and build/bundle/compile the
90+
application to be able to deploy it. This could be a framework build command
91+
such as `next build`, a build task in your `package.json` or `deno.json`, or a
92+
any other shell script. If your application does not have a build command, such
93+
as a server-side Deno application with a JavaScript or TypeScript entrypoint,
94+
you can leave this field empty.
95+
96+
### Runtime configuration
97+
98+
For most frameworks there are no options to configure here, as Deno Deploy EA
99+
will figure out the ideal runtime configuration for the app based on the
100+
framework preset. When a framework is not configured, you can choose here
101+
whether the app is a `Dynamic` app that needs to execute code server side for
102+
every request, such as an API server, server-side rendered application, etc., or
103+
a `Static` app that consists only of a set of static files that need to be
104+
hosted.
105+
106+
### Dynamic Entrypoint
107+
108+
The JavaScript or TypeScript file that should be executed to start the
109+
application. This is the file path that you would pass to`deno
110+
run`locally to
111+
start the app. The path has to be relative to the working directory.
112+
113+
### Dynamic arguments
114+
115+
Additional command line arguments to pass to the app on startup, after the
116+
entrypoint. These are arguments that are passed to the application not to Deno
117+
itself.
118+
119+
### Static Directory
120+
121+
The directory in the working directory that contains the static files to be
122+
served. For example,`dist`,`_site`, or`.output`.
123+
124+
### Single Page App mode
125+
126+
Whether the application is a single page app that should have the root
127+
`index.html` served for any paths that do not exist as files in the static
128+
directory, instead of a 404 page.
129+
130+
Closing the drawer saves the settings.
131+
132+
### Environment variables
133+
134+
On this page, you can also add environment variables by pressing the
135+
`Add/Edit environment variables` button:
136+
137+
![Screenshot of the Deploy env variables config screen](./images/env_var.png)
138+
139+
In this drawer, press the `+ Add variable` button to create a new environment
140+
variable for this project. You can give it a name, a value, and select whether
141+
this variable should be saved in plain text (you can view the value from the
142+
console later), or as a secret (you can not view the value from the console
143+
later).
144+
145+
You can also select what contexts the environment variable should be available
146+
in. The available contexts are:
147+
148+
- **Production:** requests hitting your application through one of the
149+
production domains, such as `<app>.<org>.deno.net`, or a custom domain.
150+
- **Development:** requests hitting preview domains, or git branch domains of
151+
your application.
152+
153+
Environment variables must be added to at least one context, but can be added to
154+
multiple, or even all contexts.
155+
156+
To save the environment variables, press the save button. You can re-open the
157+
drawer to edit / remove environment variables you have added.
158+
159+
You can also edit the app name on this page, and select which region(s) the
160+
application should be served from.
161+
162+
## Build and deploy your app
163+
164+
Finally, you can press the `Create App` button to create the app. This will
165+
create the app and immediately trigger the first build:
166+
167+
![Screenshot of app build logs](./images/build_logs.png)
168+
169+
On the build page you can see live streaming build logs split into multiple
170+
sections:
171+
172+
- **Prepare:** cloning the GitHub repository and restoring build cache
173+
- **Install:** executing the install command, and any framework specific
174+
pre-install setup
175+
- **Build:** executing the build command, any framework specific pre- and
176+
post-build setup, and preparing the build artifact for deployment
177+
- **Warm up:** sending a request to the preview URL of the deployment to ensure
178+
it starts up correctly. The logs shown in the Warm up section are Runtime
179+
logs, not build logs.
180+
- **Route:** Deno Deploy is rolling out the new version of this build into all
181+
global regions.
182+
183+
In the top left of this build is a button to cancel the build. For failed
184+
builds, there is also a button to restart the build.
185+
186+
For completed builds, the top right shows the preview URL of the build. Further
187+
down all timelines that this build is deployed to are shown, such as
188+
`Production`, or `Git Branch` timelines.
189+
190+
You can also see how the build was triggered on this page. This can either be
191+
`manual action`, for builds triggered through the UI, or `GitHub repo` for
192+
builds triggered through the GitHub integration.
193+
194+
You can view the application through either the preview URL, or any of the other
195+
URLs shown in the timelines list.
196+
197+
## Monitor your application
198+
199+
After visiting your application, you can view telemetry about your application
200+
in the form of the logs and traces available in our observability panels:
201+
202+
- observability
203+
- settings
636 KB
Loading
331 KB
Loading

0 commit comments

Comments
 (0)