Skip to content

Commit

Permalink
ci: update ci [skip deploy]
Browse files Browse the repository at this point in the history
  • Loading branch information
tszhong0411 committed Sep 17, 2023
1 parent 6f9d19f commit c1a81b3
Showing 1 changed file with 0 additions and 60 deletions.
60 changes: 0 additions & 60 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ on:
branches:
- main
pull_request:
types:
- opened

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

jobs:
ci:
Expand Down Expand Up @@ -46,59 +42,3 @@ jobs:

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3

deploy-preview:
name: Deploy preview
runs-on: ubuntu-latest
needs: ci
if: github.event_name == 'pull_request'

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: Install Vercel CLI
run: bun add -g vercel

- name: Install dependencies
run: bun install

- name: Build Project
run: bun run build

- name: Deploy Project to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./

deploy-production:
name: Deploy production
runs-on: ubuntu-latest
needs: ci
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, '[skip deploy]')

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: Install Vercel CLI
run: bun add -g vercel

- 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 }}

0 comments on commit c1a81b3

Please sign in to comment.