feat(backend): adding s3 supports, and also expose uploading project images #9
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
name: LLM Server CI | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'llm-server/**' | |
- 'codefox-common/**' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'llm-server/**' | |
- 'codefox-common/**' | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Install and Build LLM Server | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Setup pnpm cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile | |
- name: Build codefox-common | |
working-directory: ./codefox-common | |
run: pnpm build | |
- name: Build LLM Server | |
working-directory: ./llm-server | |
run: pnpm build | |
- name: Cache build artifacts | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./llm-server/dist | |
./llm-server/node_modules | |
key: ${{ runner.os }}-llm-server-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-llm-server-${{ hashFiles('**/pnpm-lock.yaml') }}- |