R
Railway15mo ago
sdan

Railway Github Action

Hey i followed the blog online and am trying to deploy my railway app under a backend/ directory in my mono repo, i tried this but getting a 500 error on github actions, any chance i can get some help?
deploy_backend:
runs-on: ubuntu-latest
name: Deploy Backend to Railway
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Change to Backend Directory
run: cd backend

- name: Use Node 18
uses: actions/setup-node@v1
with:
node-version: 18.x

- name: Install Packages
run: yarn install --frozen-lockfile

- name: Install Railway CLI
run: npm i -g @railway/cli

- name: Deploy to Railway
run: railway up
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
workingDirectory: './backend'
deploy_backend:
runs-on: ubuntu-latest
name: Deploy Backend to Railway
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Change to Backend Directory
run: cd backend

- name: Use Node 18
uses: actions/setup-node@v1
with:
node-version: 18.x

- name: Install Packages
run: yarn install --frozen-lockfile

- name: Install Railway CLI
run: npm i -g @railway/cli

- name: Deploy to Railway
run: railway up
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
workingDirectory: './backend'
5 Replies
Percy
Percy15mo ago
Project ID: N/A
sdan
sdanOP15mo ago
https://blog.railway.app/p/github-actions for reference i think the issue is that idk if workingDirectory is the right term
Railway Blog
Using Github Actions with Railway
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.
Brody
Brody15mo ago
whats the reason you are deploying from github actions in the first place?
sdan
sdanOP15mo ago
Run railway up
railway up
shell: /usr/bin/bash -e {0}
env:
RAILWAY_TOKEN: ***
Indexing...
Uploading...
Failed to upload code with status code 504 Gateway Timeout
Error: Process completed with exit code 1.
Run railway up
railway up
shell: /usr/bin/bash -e {0}
env:
RAILWAY_TOKEN: ***
Indexing...
Uploading...
Failed to upload code with status code 504 Gateway Timeout
Error: Process completed with exit code 1.
getting a 504 timeout hmm i guess i can just set it up on railway's end directly yeah i thought it would be cleaner to have everything in a github action but thinking again i can just do this via railway
Brody
Brody15mo ago
indeed just set the root directory in the service settings unless you are using the action to do something else as well?
Want results from more Discord servers?
Add your server