惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

雷峰网
雷峰网
小众软件
小众软件
有赞技术团队
有赞技术团队
P
Proofpoint News Feed
V
V2EX
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
Forbes - Security
Forbes - Security
Project Zero
Project Zero
Microsoft Security Blog
Microsoft Security Blog
Cyberwarzone
Cyberwarzone
Security Latest
Security Latest
S
Securelist
NISL@THU
NISL@THU
B
Blog RSS Feed
爱范儿
爱范儿
H
Hackread – Cybersecurity News, Data Breaches, AI and More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
Darknet – Hacking Tools, Hacker News & Cyber Security
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
H
Hacker News: Front Page
F
Full Disclosure
J
Java Code Geeks
Recent Commits to openclaw:main
Recent Commits to openclaw:main
The Hacker News
The Hacker News
L
LangChain Blog
Google DeepMind News
Google DeepMind News
I
InfoQ
Last Week in AI
Last Week in AI
S
Security @ Cisco Blogs
PCI Perspectives
PCI Perspectives
IT之家
IT之家
P
Proofpoint News Feed
AI
AI
Hacker News - Newest:
Hacker News - Newest: "LLM"
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
www.infosecurity-magazine.com
www.infosecurity-magazine.com
W
WeLiveSecurity
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Martin Fowler
Martin Fowler
L
LINUX DO - 热门话题
T
Tenable Blog
M
MIT News - Artificial intelligence
N
News | PayPal Newsroom
Blog — PlanetScale
Blog — PlanetScale
Recorded Future
Recorded Future
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏

Railway Blog

Where Railway is, and where it's going (Summer 2026) PaaS vs IaaS vs SaaS: What Each Means and Who Should Pick What in 2026 The Best Continuous Deployment Tools in 2026 The Best PaaS for Multi-Region Deployments in 2026 The Best Platforms for Monorepo Deployments in 2026 Compliance Isn't a Feature, It's a Posture What is BYOC (Bring Your Own Cloud)? A Developer's Guide for 2026 The Best Managed Kubernetes Hosting in 2026 The Best Container Registries in 2026 The Vanilla Cloud Tax: What Rolling Your Own on AWS Actually Costs What is a PaaS? A Developer's Guide for 2026 The Best Cloud Observability and Logging Tools in 2026 The Best PostgreSQL Hosting for Developers in 2026 The Best Multi-Region Hosting Platforms in 2026 The Best Platforms to Deploy AI Apps in 2026 (Not the Models, the Apps Around Them) The Agent-Native Cloud: What It Means and Why It Matters Incident Report: May 19, 2026- GCP Account Suspension Counting to 3 with a new builder processing 50M+ monthly builds Railway iOS preview now available via TestFlight Kill your onboarding: selling to 10,000+ new users a day Your AI wants to nuke your database. Guardrails fix that. Better Rails for Agents: A New Remote MCP and Railway Agent in the CLI Moving Railway's Frontend Off Next.js One command deploys, there's a Stripe APP for that From registrar to deployed: buying a domain inside Railway A letter to open source builders who deserve more Networking is a black box, we used eBPF to open it Heroku Walked So Railway Can Run Security Features Your Security Team Will Love Railway Runs Open Source, Now We're Funding It Railway raises $100M Series B to unburden the builders Deploy autoscaling services, AI Workflow automation, and LLM APIs Without Kubernetes Hosting Postgres with GeoLite2: a practical guide to IP geolocation, data loading, and updates Serverless functions vs containers: CI/CD, database connections, cron jobs, and long-running tasks Hosting Postgres with pgvector: provider tradeoffs, migrations, indexes, and tuning Introducing the Railway integration on Delve.co Secure Cloud Hosting for Compliance: A Practical Guide for Startups and Regulated Industries How G2X Unlocked Rapid Experimentation at Scale with Railway MindFort Runs 100+ AI Pen Testing Agents Without Their Previous $10k AWS Bill How Bilt's Marketing Engineering Team Delivers at Scale with Railway Railway Technology Partners: Earn Revenue on Templates You Didn't Build ~$1 Million Paid to Developers Who Built Railway Templates CI/CD for Modern Deployment: From Manual Deploys to PR Environments Kernel Powers 1,000+ AI Agents on $444/Month of Railway Infrastructure Deploy Full-Stack TypeScript Apps: Architectures, Execution Models, and Deployment Choices Railway vs Cloudflare: How Their Architectures Differ and When to Use Each Run Scheduled and Recurring Tasks with Cron Monitoring & Observability: Using Logs, Metrics, Traces, and Alerts to Understand System Failures Logs, Metrics, and Traces: What Does Each Signal Tell You? Server rendering benchmarks: Railway vs Cloudflare vs Vercel Top five Heroku alternatives Comparing top PaaS and deployment providers Pricing to Encourage Use The F in SOC2 stands for functional Deploy Together, Earn Together: Introducing Railway Partnerships How We Oops-Proofed Infrastructure Deletion on Railway Bring Back the Free Plan Railway MCP - Stateful, Serverful, Pay-per-use Infrastructure Hackathon: Winners Announced! Mark Your Calendar: Railway User Hackathon with Prizes Launching Railway's Affiliate Program Zero-Touch Bare Metal at Scale Ssh, We’re Announcing One More Thing! $1M for Open Source Introducing Central Station Speed Isn’t Just About Code, It’s About Where That Code Runs One-Second Deploys? We Didn’t Believe It Either Why We’re Moving on From Nix Railway V3: Faster and Cheaper How to Migrate from Cloudflare Pages to Railway Supercharging Directus on Railway with a Static Frontend How to Migrate from AWS Lambda to Railway Deploy Triton Inference Server on Railway How to Handle Database Connection Pooling Building a NestJS App on Railway Manually Optimize Deployments on Railway Implement a GitHub Actions Testing Suite Scaling a SaaS application on Railway Building a SaaS application on Railway Deploy a Dart App on Railway, Part 2 Deploy a Dart App on Railway, Part 1 Implementing Feature Flags from Scratch Cron Jobs with Django and GitHub Actions Deploy Offen on Railway Queues on Railway Working with NX, Railway and CI/CD Automated PostgreSQL Backups Using GitLab CI/CD with Railway Migrating From Heroku To Railway Cron Jobs on Railway Deploy Beam on Railway Deploy Authorizer on Railway Deploying Monorepo Applications How to Backup and Restore Your Postgres Database How to Backup Your Redis Instance Deploy Cusdis on Railway Deploy Ghost on Railway Deploy Calendso (cal.com) on Railway Self-hosted website analytics Use Notion as a CMS for your NextJS blog
Using Github Actions with Railway
Faraz Patankar · 2021-06-04 · via Railway Blog

Github Actions come with a pretty neat set of features to automate your workflows. In this post, we talk about using Github Actions to automate your deployments on Railway.


At Railway, we've set up Github triggers so that your app can be automatically deployed when you push to a selected branch within the connected repository. This works for most basic use-cases but after a while, you probably want more control and that's where Github Actions come in.

If you haven't used them before, Github Actions allow you to automate several parts of your development workflow. Think building your app, running some tests, managing pull requests; the possibilities are endless. Recently, within our Discord, we've had a couple of users ask us how they'd go about deploying their app on Railway using Github Actions so we thought it'd be a good idea to publish a short tutorial doing just that.

Project tokens

To interact with your project within Github Actions, you'd have to use the Railway CLI and because you can't really log in to the CLI within a remote server, we allow you to provision project tokens. Project tokens allow the CLI to access all the environment variables associated with a specific project and environment.

You can create a new project token on the Settings page of your project dashboard within the Tokens submenu.

Create project token
Create project token

Once you created your project token, you can add it to your repository secrets on Github by visiting the Secrets submenu under repository settings.

Repository secrets
Repository secrets

Lights, camera, action!

name: Deploy to Railway

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    container: ghcr.io/railwayapp/cli:latest
    env:
      SVC_ID: my-service-id
      RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
    steps:
      - uses: actions/checkout@v3
      - run: railway up --service=${{ env.SVC_ID }}

The action shared above is pretty self-explanatory. Whenever some code is pushed to the main branch, the action is triggered. The deploy job pulls the latest version of the CLI docker image and uses it as a base container. The, the only thing left is to checkout your code and upload it to Railway!

Keep in mind that the RAILWAY_TOKEN must be kept secret, while the service Id can be passed freely as a part of deploy command, or as an environment variable, defined inside the job configuration.

Conclusion

While this was a very basic example of deploying your application on Railway using Github Actions, you can do all sorts of things using the project token. We have users using it to manage pull requests, migrate their database before deploying, and, as shown in this blog post, deploying the application itself.

Let us know if you have any thoughts/feedback regarding this post or would like to see more tutorials using Github Actions. The easiest way to reach us is our Discord server which we also use to run all our internal communications which you can read about in this post.