
Deploy
Push local code to Railway with `railway up`, a clear commit message, and detach or CI log streaming when you are ready to ship.
Overview
Deploy is an agent skill for the Ship phase that pushes code from the current directory to Railway using `railway up` with descriptive commit messages and detach or CI log modes.
Install
npx skills add https://github.com/railwayapp/railway-skills --skill deployWhat is this skill?
- Runs `railway up` from the current directory with required `-m` deploy commit messages
- Default detach mode returns immediately after starting the deploy
- CI mode streams build logs until completion for debugging failures
- Documents when to target a specific Railway service on multi-service projects
- Pairs with Railway new and environment skills for first-time setup and Docker/env concerns
- Two deploy modes: default detach and `--ci` log streaming until complete
- Requires `-m` commit message on every `railway up` invocation
Adoption & trust: 959 installs on skills.sh; 274 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You have local changes ready to go live on Railway but need consistent CLI commands, commit messages, and log behavior instead of one-off agent guesses.
Who is it for?
Indie builders already linked to a Railway project who repeatedly ship from the repo root and want the agent to default to `railway up --detach -m "…"`.
Skip if: First-time Railway provisioning or new service creation—use the Railway new skill—and not for Dockerfile or variable tuning without the environment skill.
When should I use this skill?
When the user wants to push code to Railway, says railway up, deploy, deploy to railway, ship, or push; use CI mode when they want to watch or fix build issues.
What do I get? / Deliverables
Your project is submitted to Railway with a labeled deploy message, using detach for fast handoff or CI mode until the build finishes so you can fix failures immediately.
- Triggered Railway deployment from the current working directory
- Deploy commit message captured via `-m` for auditability
Recommended Skills
Journey fit
Deployment is canonical under Ship because it is the moment local changes become a running Railway service, separate from day-two monitoring in Operate. Launch subphase covers pushing builds live and confirming the release path, which matches deploy, ship, and railway up triggers in the skill.
How it compares
Use this procedural deploy skill instead of generic “run your platform CLI” advice when you want Railway-specific flags, modes, and handoffs to sibling Railway skills.
Common Questions / FAQ
Who is deploy for?
It is for solo builders and small teams using Railway who want their coding agent to run standardized `railway up` deploys with meaningful `-m` messages.
When should I use deploy?
Use it in Ship when you say deploy, ship, push, railway up, or deploy to Railway; switch to CI mode when you need streamed build logs to debug a failing release.
Is deploy safe to install?
The skill only documents Railway CLI usage via allowed bash patterns—review your Railway tokens, project access, and the Security Audits panel on this page before granting shell access in production accounts.
Workflow Chain
Then invoke: skill railwayapp railway skills environment
SKILL.md
READMESKILL.md - Deploy
# Deploy Deploy code from the current directory to Railway using `railway up`. ## When to Use - User asks to "deploy", "ship", "push code" - User says "railway up" or "deploy to Railway" - User wants to deploy local code changes - User says "deploy and fix any issues" (use --ci mode) ## Commit Message Always use the `-m` flag with a descriptive commit message summarizing what's being deployed: ```bash railway up --detach -m "Add user authentication endpoint" ``` Good commit messages: - Describe what changed: "Fix memory leak in worker process" - Reference tickets/issues: "Implement feature #123" - Be concise but meaningful: "Update deps and fix build warnings" ## Modes ### Detach Mode (default) Starts deploy and returns immediately. Use for most deploys. ```bash railway up --detach -m "Deploy description here" ``` ### CI Mode Streams build logs until complete. Use when user wants to watch the build or needs to debug issues. ```bash railway up --ci -m "Deploy description here" ``` **When to use CI mode:** - User says "deploy and watch", "deploy and fix issues" - User is debugging build failures - User wants to see build output ## Deploy Specific Service Default is linked service. To deploy to a different service: ```bash railway up --detach --service backend -m "Deploy description here" ``` ## Deploy to Unlinked Project Deploy to a project without linking first: ```bash railway up --project <project-id> --environment production --detach -m "Deploy description here" ``` Requires both `--project` and `--environment` flags. ## CLI Options | Flag | Description | |------|-------------| | `-m, --message <MSG>` | Commit message describing the deploy (always use this) | | `-d, --detach` | Don't attach to logs (default) | | `-c, --ci` | Stream build logs, exit when done | | `-s, --service <NAME>` | Target service (defaults to linked) | | `-e, --environment <NAME>` | Target environment (defaults to linked) | | `-p, --project <ID>` | Target project (requires --environment) | | `[PATH]` | Path to deploy (defaults to current directory) | ## Directory Linking Railway CLI walks UP the directory tree to find a linked project. If you're in a subdirectory of a linked project, you don't need to relink. For subdirectory deployments, prefer setting `rootDirectory` via the environment skill, then deploy normally with `railway up`. ## After Deploy ### Detach mode ``` Deploying to <service>... ``` Use `deployment` skill to check build status (with `--lines` flag). ### CI mode Build logs stream inline. If build fails, the error will be in the output. **Do NOT run `railway logs --build` after CI mode** - the logs already streamed. If you need more context, use `deployment` skill with `--lines` flag (never stream). ## Composability - **Check status after deploy**: Use `service` skill - **View logs**: Use `deployment` skill - **Fix config issues**: Use `environment` skill - **Redeploy after config fix**: Use `environment` skill ## Error Handling ### No Project Linked ``` No Railway project linked. Run `railway link` first. ``` ### No Service Linked ``` No service linked. Use --service flag or run `railway service` to select one. ``` ### Build Failure (CI mode) The build logs already streamed - analyze them directly from the `railway up --ci` output. Do NOT run `railway logs` after CI mode (it streams forever without `--lines`). Common issues: - Missing dependencies → check package.json/requirements.txt - Build command wrong → use environment skill to fix - Dockerfile issues → check dockerfile path # Environment Config Reference The `EnvironmentConfig` object is used to configure services, volumes, and shared variables i