Skip to content

Merge pull request #116 from gfa-cc-after/dependabot/npm_and_yarn/fro… #30

Merge pull request #116 from gfa-cc-after/dependabot/npm_and_yarn/fro…

Merge pull request #116 from gfa-cc-after/dependabot/npm_and_yarn/fro… #30

Workflow file for this run

# Setup an action to run the Backend CD for PRs
# Continous Deployment for Backend
# name of the action
name: Backend CD
# when should it run
on:
push: #merged into main
branches:
- main
# what should it do
jobs:
# name of the job
build:
# what should it run on
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
# default values for all the steps
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Railway
run: npm i -g @railway/cli
- name: Deploy to Railway
run: railway up --environment production --service backend
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}