Skip to content

Commit 3af94eb

Browse files
author
Vasyl Yaremchuk
committed
Fix branch rule for automatica production deployment.
1 parent f77f83b commit 3af94eb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/deploy_to_railway.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
push:
88
branches:
99
- main
10-
- 'releases/**'
10+
- 'release/pr-v*'
1111

1212
workflow_dispatch:
1313
inputs:
@@ -35,7 +35,7 @@ jobs:
3535
deploy-to-railway:
3636
name: Deploy to Railway
3737
runs-on: ubuntu-latest
38-
environment: ${{ inputs.deploy-env || (github.ref_name == 'main' && 'Development') || (startsWith(github.ref_name, 'prod/') && 'Production') || (startsWith(github.ref_name, 'staging/') && 'Staging') || 'None' }}
38+
environment: ${{ inputs.deploy-env || (github.ref_name == 'main' && 'Development') || (startsWith(github.ref_name, 'release/pr-v') && 'Production') || (startsWith(github.ref_name, 'staging/') && 'Staging') || 'None' }}
3939
env:
4040
RAILWAY_TOKEN: ${{ secrets.RAILWAY_GITHUB_ACTIONS }}
4141
steps:
@@ -54,7 +54,7 @@ jobs:
5454
restore-db:
5555
name: Restore DB
5656
needs: deploy-to-railway
57-
environment: ${{ inputs.deploy-env || (github.ref_name == 'main' && 'Development') || (startsWith(github.ref_name, 'prod/') && 'Production') || (startsWith(github.ref_name, 'staging/') && 'Staging') || 'None' }}
57+
environment: ${{ inputs.deploy-env || (github.ref_name == 'main' && 'Development') || (startsWith(github.ref_name, 'release/pr-v') && 'Production') || (startsWith(github.ref_name, 'staging/') && 'Staging') || 'None' }}
5858
runs-on: ubuntu-latest
5959
if: ${{ inputs.restore-db == true }}
6060
env:
@@ -74,7 +74,7 @@ jobs:
7474
needs: restore-db
7575
if: ${{ inputs.create-admin == true }}
7676
runs-on: ubuntu-latest
77-
environment: ${{ inputs.deploy-env || (github.ref_name == 'main' && 'Development') || (startsWith(github.ref_name, 'prod/') && 'Production') || (startsWith(github.ref_name, 'staging/') && 'Staging') || 'None' }}
77+
environment: ${{ inputs.deploy-env || (github.ref_name == 'main' && 'Development') || (startsWith(github.ref_name, 'release/pr-v') && 'Production') || (startsWith(github.ref_name, 'staging/') && 'Staging') || 'None' }}
7878
env:
7979
APOS_MONGODB_URI: ${{ secrets.MONGO_URI }}
8080
ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }}

0 commit comments

Comments
 (0)