Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Nickersoft committed Sep 8, 2024
1 parent 48391d3 commit facec15
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 7 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Preview Deploy

on:
push:
branches:
- main

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run build
run: bun run build
- name: Typcheck
run: bun run check
- name: Deploy to Vercel
working-directory: ./www
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Preview Deploy

on:
push:
branches-ignore:
- main

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run build
run: bun run build
- name: Typcheck
run: bun run check
- name: Deploy to Vercel
working-directory: ./www
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
11 changes: 4 additions & 7 deletions .github/workflows/ci.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Run tests

on:
push:
Expand All @@ -11,14 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run build
run: bun run build
- name: Typcheck
run: bun run check
- name: Running tests
run: bun test
run: bun test --affected

0 comments on commit facec15

Please sign in to comment.