Skip to content

Conversation

@infomiho
Copy link
Collaborator

@infomiho infomiho commented Nov 3, 2025

Adds Railway as a deployment platform option alongside existing Fly.io support. Users can now choose between platforms using the platform input.

Changes

Core Functionality

  • ✅ Add platform input (required): Choose 'fly' or 'railway'
  • ✅ Add Railway-specific inputs: railway-token, project-name, railway-workspace
  • ✅ Conditional CLI installation (Flyctl for Fly, Railway CLI for Railway)
  • ✅ Conditional deployment logic for both platforms
  • ✅ Improved bash variable handling

Documentation

  • 📝 README updated with TODO comments for final documentation
  • 📝 Sections planned for: Fly setup, Railway setup, platform comparison, breaking changes

Example Usage

Fly.io (existing users must add platform: fly)

- uses: wasp-lang/deploy-action@main
  with:
    platform: fly
    fly-token: ${{ secrets.FLY_TOKEN }}

Railway (new)

- uses: wasp-lang/deploy-action@main
  with:
    platform: railway
    railway-token: ${{ secrets.RAILWAY_TOKEN }}
    project-name: my-app

Breaking Changes

⚠️ Existing users must update their workflows to add platform: fly

TODO

  • Complete README documentation (replace TODO comments with actual content)
  • Test with real Fly.io deployment
  • Test with real Railway deployment

infomiho and others added 7 commits November 3, 2025 13:02
This PR adds Railway as a deployment platform option while maintaining backward compatibility with Fly.io deployments.

## Changes

### action.yml
- Add `platform` input (required): Choose 'fly' or 'railway'
- Add Railway-specific inputs:
  - `railway-token`: Railway API token
  - `project-name`: Railway project name (max 25 chars)
  - `railway-workspace`: Optional workspace ID for multi-workspace accounts
- Update action metadata to reflect dual platform support
- Add conditional CLI installation (Flyctl for Fly, Railway CLI via npm for Railway)
- Add conditional deployment steps for each platform
- Improve bash variable handling in deployment commands

### README.md
- Add TODO comments for documentation sections
- Structure for both Fly.io and Railway setup instructions
- Placeholder for platform comparison table
- Breaking change notice for existing users

## Breaking Changes
⚠️ Existing users must add `platform: fly` to their workflow configuration

## Notes
- Follows GitHub Actions patterns (no manual input validation)
- Railway CLI installed via npm install -g @railway/cli
- Based on Wasp Railway deployment patterns from wasp-lang/wasp#3157

🤖 Generated with Claude Code

Co-Authored-By: Claude <[email protected]>
- Add node-version input (defaults to 22)
- Setup Node.js before installing Wasp
- Update README with node-version documentation
- Remove railway-workspace-id input (not supported by deploy command)
- Simplify Railway deploy to just use project name
- Update README to remove workspace references
Railway CLI expects RAILWAY_TOKEN not RAILWAY_API_TOKEN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants