david0
david0
RRailway
Created by david0 on 11/14/2024 in #✋|help
Railway up fails to upload in Github Action
I'm trying to deploy via Github Actions so my railway server deploys after db migrations are complete. Here's what the railway part of the action looks like,
deploy_railway:
runs-on: ubuntu-latest
needs: [db_migration]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node 12
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

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

- name: Deploy
run: railway up --service api-server --verbose
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_RELEASE_TOKEN }}
deploy_railway:
runs-on: ubuntu-latest
needs: [db_migration]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node 12
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

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

- name: Deploy
run: railway up --service api-server --verbose
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_RELEASE_TOKEN }}
Running this results in the error:
railway up
service: 9aad5d57-3685-492a-914a-df035b2faf7a
environment: 155bd4b0-26bd-451c-94db-54216985dd41
bytes: 260789612
url: https://backboard.railway.app/project/f87f4adf-2d4b-45bb-b71e-4ea8351c53be/environment/155bd4b0-26bd-451c-94db-54216985dd41/up?serviceId=9aad5d57-3685-492a-914a-df035b2faf7a
Uploading...
Failed to upload code with status code 520 <unknown status code>
railway up
service: 9aad5d57-3685-492a-914a-df035b2faf7a
environment: 155bd4b0-26bd-451c-94db-54216985dd41
bytes: 260789612
url: https://backboard.railway.app/project/f87f4adf-2d4b-45bb-b71e-4ea8351c53be/environment/155bd4b0-26bd-451c-94db-54216985dd41/up?serviceId=9aad5d57-3685-492a-914a-df035b2faf7a
Uploading...
Failed to upload code with status code 520 <unknown status code>
Doing the same locally shows a more specific error message: Failed to upload code. File too large (260810846 bytes). I saw from previous threads that the railway up file limit is 40mb. Is there anyway to log what's being zipped and uploaded to railway? How does this work when it's connected via GitHub on Railway but breaks through the CLI?
16 replies