Skip to content

Commit 7a4d45d

Browse files
samejr0ski
authored andcommitted
Add GitHub step to deployments page onboarding
1 parent b35c7fa commit 7a4d45d

1 file changed

Lines changed: 66 additions & 34 deletions

File tree

apps/webapp/app/components/BlankStatePanels.tsx

Lines changed: 66 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import {
5252
} from "./SetupCommands";
5353
import { StepContentContainer } from "./StepContentContainer";
5454
import { V4Badge } from "./V4Badge";
55+
import { GitHubConnectionPrompt } from "~/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings/route";
5556

5657
export function HasNoTasksDev() {
5758
return (
@@ -266,44 +267,75 @@ export function TestHasNoTasks() {
266267
}
267268

268269
export function DeploymentsNone() {
269-
const organization = useOrganization();
270-
const project = useProject();
271270
const environment = useEnvironment();
272271

273272
return (
274-
<InfoPanel
275-
icon={ServerStackIcon}
276-
iconClassName="text-deployments"
277-
title="Deploy for the first time"
278-
panelClassName="max-w-full"
279-
>
280-
<Paragraph spacing variant="small">
281-
There are several ways to deploy your tasks. You can use the CLI or a Continuous Integration
282-
service like GitHub Actions. Make sure you{" "}
283-
<TextLink href={v3EnvironmentVariablesPath(organization, project, environment)}>
284-
set your environment variables
285-
</TextLink>{" "}
286-
first.
287-
</Paragraph>
288-
<div className="flex gap-3">
289-
<LinkButton
290-
to={docsPath("v3/cli-deploy")}
291-
variant="docs/medium"
292-
LeadingIcon={BookOpenIcon}
293-
className="inline-flex"
294-
>
295-
Deploy with the CLI
296-
</LinkButton>
297-
<LinkButton
298-
to={docsPath("v3/github-actions")}
299-
variant="docs/medium"
300-
LeadingIcon={BookOpenIcon}
301-
className="inline-flex"
302-
>
303-
Deploy with GitHub actions
304-
</LinkButton>
273+
<PackageManagerProvider>
274+
<div className="mb-6 flex items-center justify-between border-b">
275+
<div className="mb-2 flex items-center gap-2">
276+
<ServerStackIcon className="-ml-1 size-8 text-deployments" />
277+
<Header1>Deploy your tasks</Header1>
278+
</div>
279+
<div className="flex items-center">
280+
<SimpleTooltip
281+
button={
282+
<LinkButton
283+
variant="small-menu-item"
284+
LeadingIcon={BookOpenIcon}
285+
leadingIconClassName="text-blue-500"
286+
to={docsPath("deployment/overview")}
287+
/>
288+
}
289+
content="Deploy docs"
290+
/>
291+
<SimpleTooltip
292+
button={
293+
<LinkButton
294+
variant="small-menu-item"
295+
LeadingIcon={QuestionMarkCircleIcon}
296+
leadingIconClassName="text-blue-500"
297+
to={docsPath("troubleshooting#deployment")}
298+
/>
299+
}
300+
content="Troubleshooting docs"
301+
/>
302+
<AskAI />
303+
</div>
305304
</div>
306-
</InfoPanel>
305+
<StepNumber stepNumber="1a" title="Connect your GitHub repository" />
306+
<StepContentContainer>
307+
<Paragraph spacing>
308+
Connect your GitHub repository to automatically deploy whenever you push.
309+
</Paragraph>
310+
<div className="w-fit">
311+
<GitHubConnectionPrompt
312+
gitHubAppInstallations={[]}
313+
organizationSlug={""}
314+
projectSlug={""}
315+
environmentSlug={""}
316+
/>
317+
</div>
318+
</StepContentContainer>
319+
<StepNumber stepNumber="1b" title="Or run the CLI 'deploy' command" />
320+
<StepContentContainer>
321+
<Paragraph spacing>
322+
This will deploy your tasks to the {environmentFullTitle(environment)} environment. Read
323+
the <TextLink to={docsPath("deployment/overview")}>full guide</TextLink>.
324+
</Paragraph>
325+
<TriggerDeployStep environment={environment} />
326+
</StepContentContainer>
327+
<StepNumber stepNumber="1c" title="Or deploy using GitHub Actions" />
328+
<StepContentContainer>
329+
<Paragraph spacing>
330+
Read the <TextLink to={docsPath("github-actions")}>GitHub Actions guide</TextLink> to get
331+
started.
332+
</Paragraph>
333+
</StepContentContainer>
334+
<StepNumber stepNumber="2" title="Waiting for tasks to deploy" displaySpinner />
335+
<StepContentContainer>
336+
<Paragraph>This page will automatically refresh when your tasks are deployed.</Paragraph>
337+
</StepContentContainer>
338+
</PackageManagerProvider>
307339
);
308340
}
309341

0 commit comments

Comments
 (0)