Skip to content

Commit 06eace5

Browse files
committed
feat: add triggers deploy workflow with watch path
1 parent 6b1c4ee commit 06eace5

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: [dev, main, feat/ci-cd]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
container: ghcr.io/railwayapp/cli:latest
11+
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'dev' }}
12+
env:
13+
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
14+
steps:
15+
- uses: actions/checkout@v3
16+
- id: modified
17+
uses: pheel/path-watcher-action@v1
18+
with:
19+
github_token: ${{ secrets.GITHUB_TOKEN }}
20+
paths: "apps/logic-system/**/*.ts"
21+
return_files: true
22+
# - name: Determine environment
23+
# id: env
24+
# run: |
25+
# if [[ "${{ github.ref }}" == "refs/heads/main" || "${{ github.base_ref }}" == "main" ]]; then
26+
# echo "environment=production" >> $GITHUB_OUTPUT
27+
# else
28+
# echo "environment=dev" >> $GITHUB_OUTPUT
29+
# fi
30+
- name: Deploy triggers
31+
# if: steps.modified.outputs.modified == 'true'
32+
# run: railway up -s logic-system -e ${{ steps.env.outputs.environment }} --ci -d
33+
run: echo ${{ steps.modified }}

0 commit comments

Comments
 (0)