Skip to content

Merge pull request #79 from sivasoft-cloud/patch-1 #44

Merge pull request #79 from sivasoft-cloud/patch-1

Merge pull request #79 from sivasoft-cloud/patch-1 #44

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
relase:
name: Test and Deploy to Staging
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Cache Dependencies
uses: actions/[email protected]
with:
path: ~/.bun
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: ${{ runner.os }}-bun-
- name: Setup Bun
uses: oven-sh/[email protected]
- run: bun install
- name: Run Tests
run: bun run test
- name: Deploy to Staging
id: deploy-vercel-staging
uses: amondnet/[email protected]
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_TL_ENGINE }}
scope: ${{ secrets.VERCEL_ORG_ID }}
- name: Run Tests Against Staging
env:
VERCEL_URL: ${{ steps.deploy-vercel-staging.outputs.preview-url }}
run: bun run test
- name: Deploy to Production
uses: amondnet/[email protected]
id: deploy-vercel-production
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_TL_ENGINE }}
vercel-args: --prod
scope: ${{ secrets.VERCEL_ORG_ID }}