Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
83e49a2
feat: Add Railway Integration
shambel-amare Feb 10, 2026
f048656
Merge branch 'main' of github.com:shambel-amare/superplane into feat/…
shambel-amare Feb 10, 2026
97fe0cb
fix: implemented missing method
shambel-amare Feb 11, 2026
6ff3562
fix: check for empty event action
shambel-amare Feb 11, 2026
0988b3e
fix: use example json files similar to other integrations
shambel-amare Feb 11, 2026
529e8b9
fix: read status from correct path
shambel-amare Feb 11, 2026
32136a5
fix: add prettier syntax
shambel-amare Feb 11, 2026
5a175e0
fix: generate latest doc
shambel-amare Feb 11, 2026
54b2743
fix: validate project-id from incomming webhook payload before proces…
shambel-amare Feb 11, 2026
b8ceb85
fix: remove unused method
shambel-amare Feb 11, 2026
77fdeb3
fix: non-workspace railway tokens have no access to projects
shambel-amare Feb 11, 2026
9d46877
fix: use correct railway webhook event keys
shambel-amare Feb 11, 2026
91a7f72
fix: generate docs
shambel-amare Feb 11, 2026
03fd720
fix: update deployment event options to include 'Failed' and reorder …
shambel-amare Feb 11, 2026
1202da3
fix: use correct event type on curl
shambel-amare Feb 12, 2026
6b59c90
chore: simplified instruction
shambel-amare Feb 12, 2026
b65d04c
feat: Add polling based status tracking for deployment trigger
shambel-amare Feb 12, 2026
ab0fef5
fix: use correct event name
shambel-amare Feb 12, 2026
ec68015
fix: fix prettier formating
shambel-amare Feb 12, 2026
dcda7f8
fix: fix wrong webhook handler setup
shambel-amare Feb 12, 2026
bd5c0dc
fix: add omitted from final status check
shambel-amare Feb 12, 2026
4ed1310
Merge branch 'main' of github.com:shambel-amare/superplane into feat/…
shambel-amare Feb 12, 2026
752e78c
chore: removed unused test
shambel-amare Feb 12, 2026
6db7195
chore: match example data to code
shambel-amare Feb 12, 2026
f8f8feb
chore: generate components doc
shambel-amare Feb 12, 2026
82ff5a3
fix: fix prettier formating
shambel-amare Feb 12, 2026
9940fa0
fix: fix prettier formating
shambel-amare Feb 12, 2026
710561e
chore: increase polling interval
shambel-amare Feb 12, 2026
8501c5c
chore: format with prettier
shambel-amare Feb 12, 2026
0e7cfe9
Merge branch 'main' of github.com:shambel-amare/superplane into feat/…
shambel-amare Feb 12, 2026
e230307
fix: added missing mapper for railway trigger
shambel-amare Feb 18, 2026
bde78de
Merge branch 'main' of github.com:shambel-amare/superplane into feat/…
shambel-amare Feb 18, 2026
fc6c9e8
fix: add missed evens on trigger block
shambel-amare Feb 18, 2026
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
154 changes: 154 additions & 0 deletions docs/components/Railway.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
---
title: "Railway"
---

Deploy and monitor Railway applications

## Triggers

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

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

## Actions

<CardGrid>
<LinkCard title="Trigger Deploy" href="#trigger-deploy" description="Trigger a new deployment for a Railway service" />
</CardGrid>

## Instructions

Create an API token in Railway and paste it below.

**Important:** When creating the token, select a **specific workspace** to access its projects. The "No Workspace" option will not work.

[Create Railway Token →](https://railway.com/account/tokens)

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

## On Deployment Event

The On Deployment Event trigger starts a workflow when Railway sends deployment status webhooks.

### Setup

After configuring this trigger:
1. Copy the webhook URL shown in the trigger settings
2. Go to Railway → Your Project → Settings → Webhooks
3. Add the webhook URL and select "Deploy" events
4. Save the webhook configuration

### Use Cases

- **Deployment notifications**: Notify Slack when deployments complete or fail
- **Incident creation**: Create tickets when deployments crash
- **Pipeline chaining**: Trigger downstream workflows after successful deployments

### Configuration

- **Project**: Select the Railway project to monitor
- **Event Filter**: Optionally filter by deployment event type (deployed, failed, crashed, etc.)
- Leave empty to receive all deployment events

### Event Data

Each deployment event includes:
- `type`: Event type (e.g., Deployment.deployed, Deployment.failed)
- `details.status`: Deployment status (SUCCESS, FAILED, etc.)
- `resource.deployment.id`: Deployment ID
- `resource.service`: Service name and ID
- `resource.environment`: Environment name and ID
- `resource.project`: Project information
- `timestamp`: When the event occurred

### Example Data

```json
{
"details": {
"branch": "main",
"commitAuthor": "developer",
"commitHash": "abc123def456",
"commitMessage": "Update deployment",
"id": "deploy-abc123",
"serviceId": "srv-xyz789",
"source": "GitHub",
"status": "SUCCESS"
},
"resource": {
"deployment": {
"id": "deploy-jkl345"
},
"environment": {
"id": "env-def456",
"isEphemeral": false,
"name": "production"
},
"project": {
"id": "proj-xyz789",
"name": "my-project"
},
"service": {
"id": "srv-ghi012",
"name": "api-server"
},
"workspace": {
"id": "ws-abc123",
"name": "My Workspace"
}
},
"severity": "INFO",
"timestamp": "2024-01-15T10:30:00.000Z",
"type": "Deployment.deployed"
}
```

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

## Trigger Deploy

The Trigger Deploy component starts a new deployment for a Railway service and waits for it to complete.

### Use Cases

- **Deploy on merge**: Automatically deploy when code is merged to main
- **Scheduled deployments**: Deploy on a schedule (e.g., nightly releases)
- **Manual approval**: Deploy after approval in the workflow
- **Cross-service orchestration**: Deploy services in sequence

### How It Works

1. Triggers a new deployment via Railway's API
2. Polls for deployment status updates (Queued → Building → Deploying → Success/Failed)
3. Routes execution based on final deployment status:
- **Deployed channel**: Deployment succeeded
- **Failed channel**: Deployment failed
- **Crashed channel**: Deployment crashed

### Configuration

- **Project**: Select the Railway project
- **Service**: Select the service to deploy
- **Environment**: Select the target environment (e.g., production, staging)

### Output Channels

- **Deployed**: Emitted when deployment succeeds
- **Failed**: Emitted when deployment fails
- **Crashed**: Emitted when deployment crashes

### Example Output

```json
{
"deploymentId": "deploy-abc123",
"environment": "env-def456",
"project": "proj-xyz789",
"service": "srv-ghi012",
"status": "SUCCESS",
"url": "https://my-service-production.up.railway.app"
}
```

Loading