Error on GitHub Actions. Flask app has been deployed successfully.
Anonymous
TRIALOP

2 years ago

When I try to automate the deployment process through github actions, I get the same error.

Here's the yml file:

name: Deploy to Railway

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: '3.9'

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt

      - name: Railway Deploy
        uses: bervProject/railway-deploy@main
        with:
          railway_token: ${{ secrets.RAILWAY_TOKEN }}
          service: "my-service"
          detach: true

36 Replies

Anonymous
TRIALOP

2 years ago

4cd190fb-44e4-4599-af46-2de405c0bce2


2 years ago

may I ask why you are installing python and your apps deps in the action?


Anonymous
TRIALOP

2 years ago

I don't know. I am new to this. I got this solution from gpt.


Anonymous
TRIALOP

2 years ago

Can you please guide me?


2 years ago

what is the purpose of using a GitHub action in the first place?


Anonymous
TRIALOP

2 years ago

continuous integration/ continuous deployment.


2 years ago

did you just give me a chatgpt answer to my question?


Anonymous
TRIALOP

2 years ago

nope.


2 years ago

okay then please answer the question properly


Anonymous
TRIALOP

2 years ago

let me explain what I understood properly.


Anonymous
TRIALOP

2 years ago

Say we have a project in GitHub, say at each push, we want to lint, test, build, and finally deploy if everything goes right in one single push.


2 years ago

I know what you can do with GitHub actions, I'm asking what purpose it has for you, why not just set your repo to your source in the service settings?


Anonymous
TRIALOP

2 years ago

sorry, i didn't understand.


Anonymous
TRIALOP

2 years ago

Does the update happens automatically in Railway after I change something in main branch of github?


2 years ago

yes that's exactly how railway works


Anonymous
TRIALOP

2 years ago

oh I see.


2 years ago

there's no need for a GitHub action to achieve that functionality


Anonymous
TRIALOP

2 years ago

well, now I understand.


Anonymous
TRIALOP

2 years ago

If we were to do it in other platforms like AWS, AZURE… do we need to set up YML file?


Anonymous
TRIALOP

2 years ago

I am sorry, but I am a novice to all these stuffs.


2 years ago

what does aws or azure have to do with railway?


Anonymous
TRIALOP

2 years ago

I mean I was learning how to deploy Flask app on AWS EC2 instance the other day. I was trying to automate through github actions similarly. I got bunch of errors, so I quit.


Anonymous
TRIALOP

2 years ago

Thank you for the clarification.@Brody


2 years ago

use your repo as a source and let me know if you run into further issues


Anonymous
TRIALOP

2 years ago

let me clear one more thing for now, do I not need.github/workflow/deploy.yml file in my repo?
Also, if I deploy my project in RAILWAY through GitHub repo (source), from where does the ci/cd automation carry out?


2 years ago

you do not need a workflow action for a simple railway deploy, but having it is not going to affect anything.

there will be no ci/cd ran, only your app will be ran


Anonymous
TRIALOP

2 years ago

It means I have to push the correct code in github repo everytime otherwise the deployment may get an error? right?


2 years ago

as long as you implement a readiness health check, railway won't push a build out if it fails building or the health check


Anonymous
TRIALOP

2 years ago

got it.


Anonymous
TRIALOP

2 years ago

Thank you ❤️


2 years ago

no problem!


Anonymous
TRIALOP

2 years ago

just had an idea, can you clarify?
i.e. to add yml file to lint and test for each push in github. Only after successful test, it is push to github main, after which gets automatically deployed in RAILWAY.

1242742902879420400


Anonymous
TRIALOP

2 years ago

@Brody


2 years ago

please don't ping, it's against the server rules


2 years ago

but I'm sorry, I'm not going to help with AI generated answers, please watch some YouTube videos and read some articles written by humans who know what they're talking about


Anonymous
TRIALOP

2 years ago

well, yes. that's a nice idea.


Loading...