Skip to content

fix weaviate backup #84

fix weaviate backup

fix weaviate backup #84

name: frontend checks
on:
push:
branches:
- main
- mwp_v1
pull_request:
paths:
- ".github/**"
- "docker/**"
- "frontend/**"
jobs:
frontend-checks:
runs-on: self-hosted
env:
API_WORKERS: 1
VITE_APP_SERVER: http://localhost:13120
COMPOSE_PROFILES: "weaviate,ray,background,backend,frontend"
RAY_CONFIG: "config_gpu.yaml"
JWT_SECRET: ${{ secrets.JWT_SECRET }}
steps:
- uses: actions/checkout@v3
- name: Checkout PR
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr checkout ${{ github.event.pull_request.number }}
- name: Prepare environment
run: |
./bin/setup-folders.sh
./bin/setup-envs.sh --project_name action-runner --port_prefix 131
sed -i 's/\(DATS_FRONTEND_DOCKER_VERSION=[0-9.]*\)/\1-${{ github.run_id }}/' docker/.env
echo "SPACY_CACHE_DIR=$HOME/spacy_models" >> docker/.env
echo "MODELS_CACHE_DIR=$HOME/models_cache" >> docker/.env
mkdir -p $HOME/spacy_models
mkdir -p $HOME/models_cache
- name: Build & Start Docker Containers
working-directory: docker
run: |
docker compose build dats-frontend
docker compose up --wait --quiet-pull
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Check 1 - api client is up-to-date
working-directory: frontend
run: |
npm run update-api
npm run generate-api
- name: Add and commit changes
uses: EndBug/add-and-commit@v9
if: github.event_name == 'pull_request'
with:
add: "frontend/src/api"
message: "Update OpenAPI spec and client"
pathspec_error_handling: exitImmediately
default_author: github_actions
- name: Cleanup
working-directory: docker
if: always()
run: |
docker compose down -v
FRONTEND_IMAGE=uhhlt/dats_frontend:$(grep -oP 'DATS_FRONTEND_DOCKER_VERSION=\K.*' .env)
docker rmi $FRONTEND_IMAGE