Skip to content

Deploy Spring Boot with Railway #68

Deploy Spring Boot with Railway

Deploy Spring Boot with Railway #68

Workflow file for this run

name: Deploy Spring Boot with Railway
on:
workflow_run:
workflows: [ Publish Auction Backend Docker Image ]
types:
- completed
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Maven
run: mvn -B package -DskipTests --file pom.xml
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Railway
run: npm i -g @railway/cli
- name: Deploy
run: railway up --service web
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}