Skip to content

refactor: using dorny/paths-filter action #2

refactor: using dorny/paths-filter action

refactor: using dorny/paths-filter action #2

Workflow file for this run

name: Deploy
on:
push:
branches: [dev, main, feat/ci-cd]
jobs:
changes:
runs-on: ubuntu-latest
outputs:
logic-system: ${{ steps.filter.outputs.logic-system }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
logic-system:
- 'apps/logic-system/**/*.ts'
deploy:
runs-on: ubuntu-latest
container: ghcr.io/railwayapp/cli:latest
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'dev' }}
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
steps:
- uses: actions/checkout@v3
# - name: Determine environment
# id: env
# run: |
# if [[ "${{ github.ref }}" == "refs/heads/main" || "${{ github.base_ref }}" == "main" ]]; then
# echo "environment=production" >> $GITHUB_OUTPUT
# else
# echo "environment=dev" >> $GITHUB_OUTPUT
# fi
- name: Deploy triggers
# if: steps.modified.outputs.modified == 'true'
# run: railway up -s logic-system -e ${{ steps.env.outputs.environment }} --ci -d
run: echo ${{ needs.changes.outputs }}