Merge pull request #115 from gfa-cc-after/SCRUM-96 #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup an action to run the frontend CD for PRs | |
# Continous Deployment for frontend | |
# name of the action | |
name: Frontend 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: frontend | |
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 frontend | |
env: | |
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }} |