Skip to content

Commit

Permalink
add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nikgraf committed Jun 1, 2024
1 parent 65b0dd9 commit a34c44b
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/deploy-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Deploy Server"

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: ./apps/server
- name: Generate Prisma Client
working-directory: ./apps/server
run: yarn prisma generate
- name: Build
working-directory: ./apps/server
run: yarn build
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only ./apps/server/build
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/deploy-web-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy Web
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches:
- main
jobs:
Deploy:
defaults:
run:
working-directory: ./apps/app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Generate Prisma Client
run: cd ../server && yarn prisma generate
- name: Install Vercel CLI
run: npm install --global vercel@canary
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
44 changes: 44 additions & 0 deletions .github/workflows/tests-and-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Tests and Checks

on: [push]

jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Generate Prisma Client
run: cd apps/server && yarn prisma generate
- name: Typecheck
run: yarn ts:check
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Linting
run: yarn lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 # needed until 18 becomes the default
with:
node-version: 18
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Test
run: yarn test

0 comments on commit a34c44b

Please sign in to comment.