Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ci build step
Browse files Browse the repository at this point in the history
rohannair committed Jul 20, 2024

Verified

This commit was signed with the committer’s verified signature.
lamweili Lam Wei Li
1 parent 7e35cd3 commit c601cc5
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Monorepo Build

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
build_target:
description: "Choose what to build"
required: true
default: "both"
type: choice
options:
- ui
- api
- both

jobs:
detect-changes:
runs-on: blacksmith-arm
outputs:
ui_changed: ${{ steps.changes.outputs.ui }}
api_changed: ${{ steps.changes.outputs.api }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
ui:
- 'packages/ui/**'
api:
- 'packages/api/**'
build-ui:
needs: detect-changes
if: >
needs.detect-changes.outputs.ui_changed == 'true' ||
github.event.inputs.build_target == 'ui' ||
github.event.inputs.build_target == 'both'
runs-on: blacksmith-arm
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Build UI
run: |
cd packages/ui
bun install
bun run build
build-api:
needs: detect-changes
if: >
needs.detect-changes.outputs.api_changed == 'true' ||
github.event.inputs.build_target == 'api' ||
github.event.inputs.build_target == 'both'
runs-on: blacksmith-arm
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Build API
run: |
cd packages/api
bun install
bun run build

0 comments on commit c601cc5

Please sign in to comment.