Specify service to deploy using
railway up
ignisda
HOBBYOP

2 years ago

  deploy-production-instance:
    runs-on: ubuntu-latest
    needs: docker-release
    steps:
      - name: Set up CLI
        run: npm i -g @railway/cli

      - name: Deploy
        run: railway up --detach
        env:
          RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}

27 Replies

ignisda
HOBBYOP

2 years ago

How do I specify the service to be deployed?


2 years ago

have you tried running railway up --help ?


ignisda
HOBBYOP

2 years ago

yeah.


ignisda
HOBBYOP

2 years ago

does the default command deploy all the services?


ignisda
HOBBYOP

2 years ago

since I have a docker image


2 years ago

no, please see what the help flag prints


ignisda
HOBBYOP

2 years ago

it says deploys project from CWD.

1263281737262174200


ignisda
HOBBYOP

2 years ago

i dont have a project in CWD


2 years ago

you do when deploying from a github action


ignisda
HOBBYOP

2 years ago

nope, if you take a look at my action, there is no checkout step.


ignisda
HOBBYOP

2 years ago

does not make sense to checkout the repo since i dont have any configuration in it at all. I want the deploy to happen on railway.


2 years ago

ah just thought it wasnt complete


ignisda
HOBBYOP

2 years ago

i have a docker image and pg deployed on railway so i should be able to trigger deployments from CI, right?


2 years ago

i feel like im missing some context here, what do you hope to achieve running railway up without a project


ignisda
HOBBYOP

2 years ago

the docker image is set up to use :latest on Railway. So once the docker image is published (docker-release job in my workflow file), I want to deploy the latest tag on railway too.


2 years ago

okay cool, where does railway up come into play here?


ignisda
HOBBYOP

2 years ago

Should i be using railway redeploy?


2 years ago

i think you have a misunderstanding of what railway up does?


ignisda
HOBBYOP

2 years ago

possibly. i used the blog on gh actions.


2 years ago

that was for deploying a github repo


2 years ago

yes


ignisda
HOBBYOP

2 years ago

makes sense.

If i do not specify --service to redeploy, would it re-deploy the pg instance as well?


2 years ago

not sure, think it would choose the most recently modified service, or it would tell you that you have not selected a service


ignisda
HOBBYOP

2 years ago

why does it want me to be authenticated if i already provided a token?

1263285292132077600


2 years ago

what kind of token is that


ignisda
HOBBYOP

2 years ago

got it from here

1263285715748520000


2 years ago

try an account api token?


Loading...