Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/preview-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ jobs:
with:
script: |
const prNum = context.payload.pull_request.number;
const url = `https://pr-${prNum}.agentrelay.net`;
const body = `**Preview deployed!**\n\n` +
`| Environment | Details |\n` +
`|-------------|---------|\n` +
`| Web | SST preview stage \`pr-${prNum}\` deployed successfully. |\n\n` +
`| Environment | URL |\n` +
`|-------------|-----|\n` +
`| Web | ${url} |\n\n` +
`This preview will be cleaned up when the PR is merged or closed.`;

const { data: comments } = await github.rest.issues.listComments({
Expand Down
7 changes: 3 additions & 4 deletions web/sst.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default $config({
},
run() {
const isProd = $app.stage === 'production';
const AWS_MANAGED_CACHING_DISABLED_POLICY_ID = '4135ea2d-6df8-44a3-9df3-4b5a84be39ad';
const domain = isProd ? 'origin.agentrelay.net' : `${$app.stage}.agentrelay.net`;
const NEXT_PUBLIC_POSTHOG_HOST = process.env.NEXT_PUBLIC_POSTHOG_HOST ?? 'https://i.agentrelay.com';
const NEXT_PUBLIC_POSTHOG_KEY = process.env.NEXT_PUBLIC_POSTHOG_KEY ?? '';

Expand All @@ -19,9 +19,8 @@ export default $config({
NEXT_PUBLIC_POSTHOG_HOST,
NEXT_PUBLIC_POSTHOG_KEY,
},
cachePolicy: isProd ? undefined : AWS_MANAGED_CACHING_DISABLED_POLICY_ID,
// Production deploys land on orgin.agentrelay.net; SEO canonicals are set in Next metadata.
domain: isProd ? { name: 'orgin.agentrelay.net', dns: sst.cloudflare.dns({ proxy: true }) } : undefined,
// Production deploys land on origin.agentrelay.net; SEO canonicals are set in Next metadata.
domain: { name: domain, dns: sst.cloudflare.dns({ proxy: true }) },
});
},
});
Loading