Skip to content

Commit

Permalink
ci: define fly deploy workflow (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
sripwoud committed Oct 7, 2024
1 parent 4fe5d32 commit 80c4254
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy
on:
workflow_dispatch:
push:
branches: [main]
paths: ['apps/server/**', '!**/*.md', '.github/workflows/deploy.yml']

jobs:
deployment:
environment:
name: rideau-server-prod
url: https://rideau.fly.dev
name: Deploy Rideau Server to production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy
run: |
flyctl deploy \
--config apps/server/fly.toml \
--dockerfile apps/server/Dockerfile \
--remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
2 changes: 1 addition & 1 deletion apps/client/src/trpc.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { AppRouter } from '@server/trpc/trpc.router'
import { createTRPCProxyClient, httpBatchLink } from '@trpc/client'

const PORT = 3001 // TODO: make this configurable and/or use env vars
const PORT = process.env.NODE_ENV === 'production' ? 'https://rideau.fly.dev' : 3001 // TODO: make this configurable and/or use env vars

export const trpc = createTRPCProxyClient<AppRouter>({
links: [
Expand Down

0 comments on commit 80c4254

Please sign in to comment.