-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |