Skip to content

Commit 181c2af

Browse files
Merge branch 'main' into example-apps
2 parents b7347a0 + 46e5949 commit 181c2af

File tree

17 files changed

+1291
-366
lines changed

17 files changed

+1291
-366
lines changed

.github/workflows/llmstxt.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Generate LLMs.txt
22

33
on:
4-
schedule:
5-
- cron: "0 0 * * 0" # Run at 00:00 every Sunday
64
workflow_dispatch:
5+
pull_request:
6+
types: [opened, synchronize, reopened]
77

88
permissions:
99
contents: write
@@ -27,7 +27,8 @@ jobs:
2727
- name: Checkout code
2828
uses: actions/checkout@v4
2929
with:
30-
ref: main
30+
ref: ${{ github.event.pull_request.head.ref || github.ref }}
31+
token: ${{ secrets.DOCS_PUBLISHABLE_GH_TOKEN }}
3132

3233
- name: Install dependencies
3334
run: npm install -g pnpm
@@ -40,8 +41,26 @@ jobs:
4041
env:
4142
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
4243

43-
# commit the changes and make a PR (branch protection)
44-
- name: Create Pull Request
44+
- name: Check for changes
45+
id: check-changes
46+
run: |
47+
if [ -n "$(git status --porcelain)" ]; then
48+
echo "has_changes=true" >> $GITHUB_OUTPUT
49+
else
50+
echo "has_changes=false" >> $GITHUB_OUTPUT
51+
fi
52+
53+
- name: Commit changes to PR
54+
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name == 'pull_request'
55+
run: |
56+
git config user.name "github-actions[bot]"
57+
git config user.email "github-actions[bot]@users.noreply.github.com"
58+
git add public/llms.txt
59+
git commit -m "🤖 Regenerate LLMs.txt"
60+
git push
61+
62+
- name: Create Pull Request (for scheduled/manual runs)
63+
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name != 'pull_request'
4564
id: cpr
4665
uses: peter-evans/create-pull-request@v7
4766
with:
@@ -55,6 +74,7 @@ jobs:
5574
torresmateo
5675
5776
- name: Enable Pull Request Automerge
77+
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name != 'pull_request'
5878
run: gh pr merge --squash --auto ${{ steps.cpr.outputs.pull-request-number }}
5979
env:
6080
GH_TOKEN: ${{ secrets.DOCS_PUBLISHABLE_GH_TOKEN }}

app/_components/analytics.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { cn } from "@arcadeai/design-system/lib/utils";
33
import Link from "next/link";
44
import { usePostHog } from "posthog-js/react";
5+
import { getDashboardUrl } from "./dashboard-link";
56

67
export type LinkClickedProps = {
78
linkLocation: string;
@@ -25,7 +26,7 @@ export const SignupLink = ({
2526
return (
2627
<Link
2728
className={cn("text-primary", className)}
28-
href={"https://api.arcade.dev/signup"}
29+
href={getDashboardUrl("register")}
2930
onClick={() => trackSignupClick(linkLocation)}
3031
>
3132
{children}

app/_components/dashboard-link.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import Link from "next/link";
2+
3+
const DASHBOARD_BASE_URL =
4+
process.env.NEXT_PUBLIC_DASHBOARD_URL || "https://api.arcade.dev";
5+
6+
export const getDashboardUrl = (path = "") =>
7+
path
8+
? `${DASHBOARD_BASE_URL}/dashboard/${path}`
9+
: `${DASHBOARD_BASE_URL}/dashboard`;
10+
11+
type DashboardLinkProps = {
12+
path?: string;
13+
children?: React.ReactNode;
14+
};
15+
16+
export const DashboardLink = ({
17+
path = "",
18+
children = "Arcade account",
19+
}: DashboardLinkProps) => <Link href={getDashboardUrl(path)}>{children}</Link>;

app/_components/guide-overview.tsx

Lines changed: 87 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -34,37 +34,22 @@ export function GuideOverview({ children, className }: GuideOverviewProps) {
3434
className
3535
)}
3636
>
37-
{/* Outcomes section (full width) */}
38-
{outcomes && (
39-
<div className="mb-6">
40-
<h2 className="mb-3 font-semibold text-card-foreground text-xl">
41-
Outcomes
42-
</h2>
43-
<div className="text-muted-foreground">
44-
{React.isValidElement(outcomes) &&
45-
(outcomes.props as { children: React.ReactNode }).children}
46-
</div>
47-
</div>
48-
)}
49-
50-
{/* Two column layout - You will Learn (2/3) and Prerequisites (1/3) */}
51-
<div className="grid gap-6 md:grid-cols-3">
52-
{/* You will Learn column - takes 2/3 of width */}
53-
{youWillLearn && (
54-
<div className="md:col-span-2">
55-
<h3 className="mb-3 font-medium text-card-foreground text-lg">
56-
You will Learn
57-
</h3>
58-
<div className="space-y-2 text-muted-foreground text-sm">
59-
{React.isValidElement(youWillLearn) &&
60-
(youWillLearn.props as { children: React.ReactNode }).children}
37+
{/* When only Outcomes and Prerequisites exist, show them side by side */}
38+
{outcomes && prerequisites && !youWillLearn && (
39+
<div className="grid gap-6 md:grid-cols-2">
40+
{/* Outcomes column */}
41+
<div>
42+
<h2 className="mb-3 font-semibold text-card-foreground text-xl">
43+
Outcomes
44+
</h2>
45+
<div className="text-muted-foreground">
46+
{React.isValidElement(outcomes) &&
47+
(outcomes.props as { children: React.ReactNode }).children}
6148
</div>
6249
</div>
63-
)}
6450

65-
{/* Prerequisites column - takes 1/3 of width */}
66-
{prerequisites && (
67-
<div className="md:col-span-1">
51+
{/* Prerequisites column */}
52+
<div>
6853
<h3 className="mb-3 font-medium text-card-foreground text-lg">
6954
Prerequisites
7055
</h3>
@@ -73,8 +58,80 @@ export function GuideOverview({ children, className }: GuideOverviewProps) {
7358
(prerequisites.props as { children: React.ReactNode }).children}
7459
</div>
7560
</div>
76-
)}
77-
</div>
61+
</div>
62+
)}
63+
64+
{/* When YouWillLearn exists, use the original layout */}
65+
{youWillLearn && (
66+
<>
67+
{/* Outcomes section (full width) */}
68+
{outcomes && (
69+
<div className="mb-6">
70+
<h2 className="mb-3 font-semibold text-card-foreground text-xl">
71+
Outcomes
72+
</h2>
73+
<div className="text-muted-foreground">
74+
{React.isValidElement(outcomes) &&
75+
(outcomes.props as { children: React.ReactNode }).children}
76+
</div>
77+
</div>
78+
)}
79+
80+
{/* Two column layout - You will Learn (2/3) and Prerequisites (1/3) */}
81+
<div className="grid gap-6 md:grid-cols-3">
82+
{/* You will Learn column - takes 2/3 of width */}
83+
<div className="md:col-span-2">
84+
<h3 className="mb-3 font-medium text-card-foreground text-lg">
85+
You will Learn
86+
</h3>
87+
<div className="space-y-2 text-muted-foreground text-sm">
88+
{React.isValidElement(youWillLearn) &&
89+
(youWillLearn.props as { children: React.ReactNode })
90+
.children}
91+
</div>
92+
</div>
93+
94+
{/* Prerequisites column - takes 1/3 of width */}
95+
{prerequisites && (
96+
<div className="md:col-span-1">
97+
<h3 className="mb-3 font-medium text-card-foreground text-lg">
98+
Prerequisites
99+
</h3>
100+
<div className="space-y-2 text-muted-foreground text-sm">
101+
{React.isValidElement(prerequisites) &&
102+
(prerequisites.props as { children: React.ReactNode })
103+
.children}
104+
</div>
105+
</div>
106+
)}
107+
</div>
108+
</>
109+
)}
110+
111+
{/* Fallback for edge cases - only outcomes, only prerequisites, etc. */}
112+
{outcomes && !prerequisites && !youWillLearn && (
113+
<div>
114+
<h2 className="mb-3 font-semibold text-card-foreground text-xl">
115+
Outcomes
116+
</h2>
117+
<div className="text-muted-foreground">
118+
{React.isValidElement(outcomes) &&
119+
(outcomes.props as { children: React.ReactNode }).children}
120+
</div>
121+
</div>
122+
)}
123+
124+
{!outcomes && prerequisites && !youWillLearn && (
125+
<div>
126+
<h3 className="mb-3 font-medium text-card-foreground text-lg">
127+
Prerequisites
128+
</h3>
129+
<div className="space-y-2 text-muted-foreground text-sm">
130+
{React.isValidElement(prerequisites) &&
131+
(prerequisites.props as { children: React.ReactNode }).children}
132+
</div>
133+
</div>
134+
)}
78135
</div>
79136
);
80137
}

app/en/home/build-tools/call-tools-from-mcp-clients/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Configure your MCP clients to call tools from your MCP server.
1616

1717
<GuideOverview.Prerequisites>
1818

19-
- [Arcade account](https://api.arcade.dev/signup)
19+
- <DashboardLink path="register" />
2020
- [Arcade CLI](/home/arcade-cli)
2121
- [An MCP Server](/home/build-tools/create-a-mcp-server)
2222
- [uv package manager](https://docs.astral.sh/uv/getting-started/installation/)

app/en/home/build-tools/create-a-tool-with-auth/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Create and use an MCP tool that requires OAuth to access Reddit, prompting users
1616

1717
<GuideOverview.Prerequisites>
1818

19-
- [Arcade account](https://api.arcade.dev/signup)
19+
- <DashboardLink path="register" />
2020
- [uv package manager](https://docs.astral.sh/uv/getting-started/installation/)
2121
- [Create an MCP Server](/home/build-tools/create-a-mcp-server)
2222

app/en/home/build-tools/create-a-tool-with-secrets/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Build an MCP tool that can read a secret from Context and return a masked confir
1616

1717
<GuideOverview.Prerequisites>
1818

19-
- [Arcade account](https://api.arcade.dev/signup)
19+
- <DashboardLink path="register" />
2020
- [Arcade CLI](/home/quickstart)
2121
- [An MCP Server](/home/build-tools/create-a-mcp-server)
2222
- [uv package manager](https://docs.astral.sh/uv/getting-started/installation/)

app/en/home/build-tools/organize-mcp-server-tools/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Learn best practices for organizing your MCP server and tools, how to import too
1616

1717
<GuideOverview.Prerequisites>
1818

19-
- [Arcade account](https://api.arcade.dev/signup)
19+
- <DashboardLink path="register" />
2020
- [An MCP Server](/home/build-tools/create-a-mcp-server)
2121
- [uv package manager](https://docs.astral.sh/uv/getting-started/installation/)
2222

app/en/home/deployment/on-prem-mcp/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ An on-premises MCP server deployment allows you to execute tools in your own env
1616

1717
<GuideOverview.Prerequisites>
1818

19-
- [Arcade account](https://api.arcade.dev/signup)
19+
- <DashboardLink path="register" />
2020
- [Arcade CLI](/home/quickstart)
2121
- [uv package manager](https://docs.astral.sh/uv/getting-started/installation/)
2222

0 commit comments

Comments
 (0)