Skip to content
Draft
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
108 changes: 108 additions & 0 deletions docs/components/Railway.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---
title: "Railway"
---

Deploy services and react to deployment events on Railway

import { CardGrid, LinkCard } from "@astrojs/starlight/components";

## Triggers

<CardGrid>
<LinkCard title="On Deployment Event" href="#on-deployment-event" description="Trigger when a Railway deployment status changes" />
</CardGrid>

## Actions

<CardGrid>
<LinkCard title="Trigger Deploy" href="#trigger-deploy" description="Trigger a deploy for a Railway service and wait for it to complete" />
<LinkCard title="Get Deployment" href="#get-deployment" description="Retrieve a Railway deployment by ID" />
<LinkCard title="Rollback Deploy" href="#rollback-deploy" description="Roll back to a previous Railway deployment" />
</CardGrid>

<a id="on-deployment-event"></a>

## On Deployment Event

**Trigger key:** `railway.onDeployment`

The On Deployment Event trigger fires when a deployment changes status in the specified Railway project.

### Use Cases

- **Slack Notification**: Send notifications when build/deploy fails or succeeds.
- **Auto-verification**: Run integration test workflows on successful deploys.

### Configuration

- **Project**: The Railway project to watch.
- **Event Types**: Deployment statuses to listen for (defaults to Deployed and Failed).

### Example Data

```json
{
"deploymentId": "ebda9796-09e4-456f-af60-d1a66dee66a0",
"environmentId": "9a1d7a89-2cf4-4446-9b69-4cde850918aa",
"projectId": "8db400fa-357e-4646-90f0-c7eb36e88a92",
"serviceId": "2a345678-bcde-4fgh-1234-567812345678",
"status": "SUCCESS",
"timestamp": "2026-05-30T19:46:09.816Z",
"type": "Deployment.deployed"
}
```

<a id="get-deployment"></a>

## Get Deployment

**Component key:** `railway.getDeployment`

The Get Deployment action retrieves the current details of a Railway deployment.

### Configuration

- **Deploy ID**: The Railway deployment ID to retrieve.

<a id="rollback-deploy"></a>

## Rollback Deploy

**Component key:** `railway.rollbackDeploy`

The Rollback Deploy action rolls a Railway service back to a previous deployment.

### Configuration

- **Deploy ID**: The previous Railway deployment to restore.

<a id="trigger-deploy"></a>

## Trigger Deploy

**Component key:** `railway.triggerDeploy`

The Trigger Deploy action starts a new deploy for a Railway service and waits for it to complete.

### Configuration

- **Project**: The Railway project containing the service.
- **Service**: The service to deploy.
- **Environment**: The target environment.

### Output Channels

- **Success**: Emitted when the deploy completes successfully.
- **Failed**: Emitted when the deploy fails or is cancelled.

### Example Output

```json
{
"deployId": "ebda9796-09e4-456f-af60-d1a66dee66a0",
"environmentId": "9a1d7a89-2cf4-4446-9b69-4cde850918aa",
"projectId": "8db400fa-357e-4646-90f0-c7eb36e88a92",
"serviceId": "2a345678-bcde-4fgh-1234-567812345678",
"status": "SUCCESS"
}
```
Loading