Skip to content

Open-source status page, incident response and uptime monitoring

feat(dashboard): add github action code example to cli page (#2574)

Mohit Bhandari5a1c37898ee6
diff --git a/apps/dashboard/src/app/(dashboard)/cli/page.tsx b/apps/dashboard/src/app/(dashboard)/cli/page.tsx
index 016554b22..be89fa045 100644
--- a/apps/dashboard/src/app/(dashboard)/cli/page.tsx
+++ b/apps/dashboard/src/app/(dashboard)/cli/page.tsx
@@ -173,6 +173,41 @@ mcp-server:
},
];
+const githubActions = [
+ {
+ description: "Run synthetic tests",
+ template: `name: OpenStatus
+on: [push]
+
+jobs:
+ run-synthetic-tests:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: OpenStatus GitHub Action
+ uses: openstatusHQ/openstatus-github-action@v1
+ with:
+ api_key: \${{ secrets.OPENSTATUS_API_KEY }}`,
+ },
+ {
+ description: "Apply monitors configuration",
+ template: `name: OpenStatus
+on: [push]
+
+jobs:
+ apply-monitors:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: OpenStatus CLI Action
+ uses: openstatusHQ/cli-action@v1
+ with:
+ args: monitors apply
+ env:
+ OPENSTATUS_API_TOKEN: \${{ secrets.OPENSTATUS_API_TOKEN }}`,
+ },
+];
+
export default function Page() {
return (
<SectionGroup>
@@ -299,7 +334,16 @@ export default function Page() {
to to run synthetic tests in a GitHub action.
</SectionDescription>
</SectionHeader>
- {/* TODO: add code example */}
+ <div className="flex flex-col gap-6">
+ {githubActions.map((action, i) => (
+ <div key={i} className="flex flex-col gap-0.5">
+ <p className="text-muted-foreground text-xs">
+ {action.description}
+ </p>
+ <Code>{action.template}</Code>
+ </div>
+ ))}
+ </div>
</Section>
<Section>
<SectionHeader>