2021-08-20 00:56:07 +00:00
|
|
|
name: Deployment pipeline
|
2021-08-20 00:33:28 +00:00
|
|
|
|
2021-08-20 06:14:30 +00:00
|
|
|
on: push
|
2021-08-20 00:33:28 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
if: contains('refs/heads/master refs/heads/production', github.ref)
|
|
|
|
name: Deploy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
- run: npm i -g @railway/cli
|
|
|
|
- run: railway up
|
|
|
|
env:
|
2021-08-20 02:21:08 +00:00
|
|
|
RAILWAY_TOKEN: "${{ github.ref }} === 'refs/heads/master' ? ${{ secrets.RAILWAY_TOKEN_DEV }} : ${{ secrets.RAILWAY_TOKEN_PROD }}"
|