Skip to content

fix ci

fix ci #126

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
- appwrite
workflow_dispatch:
inputs:
env:
type: choice
options:
- main
- appwrite
env:
RAILWAY_ENVIRONMENT: ${{vars.RAILWAY_ENVIRONMENT}}
jobs:
build:
environment: ${{((inputs.env == 'main' || github.ref_name == 'main') && 'production') || ((inputs.env == 'appwrite' || github.ref_name == 'appwrite') && 'appwrite' || 0)}}
runs-on: ubuntu-latest
outputs:
appArtifactName: app-build-${{github.sha}}
steps:
- name: Checkout PR
uses: actions/checkout@v4
- name: 📥 Setup
uses: ./.github/actions/setup-job
- name: 📥 Monorepo install
uses: ./.github/actions/pnpm-install
- name: Build core libraries
run: |
pnpm --filter @pipelineui/workflow-parser --filter @pipelineui/workflow-languageserver --filter @pipelineui/yaml-editor build
- name: Extract translation strings
run: |
pnpm --filter=@pipelineui/app intl:extract
- name: Build app
run: |
pnpm --filter @pipelineui/app build
cp packages/app/nixpacks.toml packages/app/.output
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
path: packages/app/.output
include-hidden-files: true
retention-days: 1
deploy:
environment: ${{((inputs.env == 'main' || github.ref_name == 'main') && 'production') || ((inputs.env == 'appwrite' || github.ref_name == 'appwrite') && 'appwrite' || 0)}}
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout PR
uses: actions/checkout@v4
- name: 📥 Setup
uses: ./.github/actions/setup-job
- name: 📥 Monorepo install
uses: ./.github/actions/pnpm-install
- name: Download app build artifact
uses: actions/download-artifact@v4
with:
name: app-build-${{github.sha}}
path: artifacts/app
- name: Deploy app to Railway
run: |
cd artifacts/app
RAILWAY_TOKEN=${{ secrets.RAILWAY_DEPLOY_TOKEN }} pnpm railway up -s pipelineui-server -e ${{env.RAILWAY_ENVIRONMENT}}