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

Anonymous
TRIAL

a year 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

0 Replies

Anonymous
TRIAL

a year ago

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


a year ago

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


Anonymous
TRIAL

a year ago

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


Anonymous
TRIAL

a year ago

Can you please guide me?


a year ago

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


Anonymous
TRIAL

a year ago

continuous integration/ continuous deployment.


a year ago

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


Anonymous
TRIAL

a year ago

nope.


a year ago

okay then please answer the question properly


Anonymous
TRIAL

a year ago

let me explain what I understood properly.


Anonymous
TRIAL

a year 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.


a year 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
TRIAL

a year ago

sorry, i didn't understand.


Anonymous
TRIAL

a year ago

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


a year ago

yes that's exactly how railway works


Anonymous
TRIAL

a year ago

oh I see.


a year ago

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


Anonymous
TRIAL

a year ago

well, now I understand.


Anonymous
TRIAL

a year ago

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


Anonymous
TRIAL

a year ago

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


a year ago

what does aws or azure have to do with railway?


Anonymous
TRIAL

a year 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
TRIAL

a year ago

Thank you for the clarification.@Brody


a year ago

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


Anonymous
TRIAL

a year 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?


a year 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
TRIAL

a year ago

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


a year 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
TRIAL

a year ago

got it.


Anonymous
TRIAL

a year ago

Thank you ❤️


a year ago

no problem!


Anonymous
TRIAL

a year 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
TRIAL

a year ago

@Brody


a year ago

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


a year 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
TRIAL

a year ago

well, yes. that's a nice idea.


Error on GitHub Actions. Flask app has been deployed successfully. - Railway Help Station