From 442b3814ecbf30baae0086f08c510a33e62bd772 Mon Sep 17 00:00:00 2001 From: riccardoperra Date: Thu, 31 Oct 2024 14:16:28 +0100 Subject: [PATCH] add ci multi env --- .github/workflows/deploy.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b91de6f..abc892a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,6 +3,7 @@ on: push: branches: - main + - appwrite jobs: build: @@ -31,10 +32,13 @@ jobs: run: | pnpm --filter @pipelineui/app build - - name: Deploy to Railway + - name: Deploy to Railway (${{env.RAILWAY_ENV}}) run: | cd packages/app cp nixpacks.toml .output cp .output/server/package.json .output cd .output + pmpm railway environment ${{env.RAILWAY_ENV}} RAILWAY_TOKEN=${{ secrets.RAILWAY_TOKEN }} pnpm railway up -s pipelineui-server + env: + RAILWAY_ENV: ${{(github.ref == 'refs/heads/main' && 'production') || (github.ref == 'refs/heads/appwrite' && 'appwrite' || null)}}