Skip to content

Add top followed accounts and users by DAO count metrics to dashboard #97

Add top followed accounts and users by DAO count metrics to dashboard

Add top followed accounts and users by DAO count metrics to dashboard #97

Workflow file for this run

name: Deploy
on:
push:
branches: [dev, main]
jobs:
changes:
runs-on: ubuntu-latest
outputs:
triggers: ${{ steps.filter.outputs.triggers }}
dispatcher: ${{ steps.filter.outputs.dispatcher }}
subscriptions: ${{ steps.filter.outputs.subscriptions }}
consumers: ${{ steps.filter.outputs.consumers }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ github.ref_name }}
filters: |
triggers:
- 'apps/logic-system/src/**/*.ts'
- 'packages/**/*.ts'
dispatcher:
- 'apps/dispatcher/src/**/*.ts'
- 'packages/**/*.ts'
subscriptions:
- 'apps/subscription-server/src/**/*.ts'
consumers:
- 'apps/consumers/src/**/*.ts'
- 'packages/**/*.ts'
deploy:
runs-on: ubuntu-latest
needs: changes
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 subscriptions
if: ${{ needs.changes.outputs.subscriptions == 'true' }}
run: railway up -s subscription-server -e ${{ steps.env.outputs.environment }} --ci
- name: Deploy dispatcher
if: ${{ needs.changes.outputs.dispatcher == 'true' || needs.changes.outputs.subscriptions == 'true' }}
run: railway up -s dispatcher -e ${{ steps.env.outputs.environment }} --ci
- name: Deploy consumers
if: ${{ needs.changes.outputs.consumers == 'true' }}
run: railway up -s consumer -e ${{ steps.env.outputs.environment }} --ci
- name: Deploy triggers
if: ${{ needs.changes.outputs.triggers == 'true' }}
run: railway up -s logic-system -e ${{ steps.env.outputs.environment }} --ci