Files
mistralrs-package/.gitea/workflows/deploy-ui.yml
rob thijssen 7f9e857695
Some checks failed
poll-upstream / check (push) Successful in 1s
deploy-ui / build-and-deploy (push) Failing after 19s
feat: add React UI for rpm.lair.cafe
- Vite + React + SWC + TypeScript SPA with react-router and
  react-bootstrap
- Dark/light/system theme with Bootstrap 5.3 data-bs-theme
- Home page with repo setup instructions and copyable code blocks
- Package list and detail pages driven by packages.json
- Python script to generate packages.json from repodata XML
- Nginx config updated for SPA fallback, asset caching, removed
  autoindex
- New deploy-ui workflow triggered on ui/ or nginx config changes,
  requires runners with nvm label
- packages.json generation added to publish job after createrepo_c
- Runner setup docs for nvm and sequoia-sq added to readme

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 12:55:38 +03:00

71 lines
1.7 KiB
YAML

name: deploy-ui
on:
push:
branches: [main]
paths:
- "ui/**"
- "asset/nginx/**"
workflow_dispatch: {}
jobs:
build-and-deploy:
runs-on:
- fedora-43
- nvm
env:
RPM_REPO_HOST: oolon.kosherinata.internal
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
run: |
source ~/.nvm/nvm.sh
nvm install --lts
echo "$(dirname "$(nvm which current)")" >> "$GITHUB_PATH"
- name: Install dependencies
run: |
cd ui
npm ci
- name: Build UI
run: |
cd ui
npm run build
- name: Set up SSH
run: |
install --directory --mode 700 ~/.ssh
echo "${RSYNC_SSH_KEY}" | install --mode 600 /dev/stdin ~/.ssh/id_ed25519
env:
RSYNC_SSH_KEY: ${{ secrets.RSYNC_SSH_KEY }}
- name: Test SSH connectivity
run: |
ssh -o StrictHostKeyChecking=accept-new "gitea_ci@${RPM_REPO_HOST}" exit
- name: Deploy UI to web root
run: |
rsync \
--archive \
--verbose \
--delete \
--chmod D755,F644 \
--include="index.html" \
--include="assets/***" \
--exclude="*" \
ui/dist/ \
"gitea_ci@${RPM_REPO_HOST}:/var/www/rpm/"
- name: Deploy nginx config
run: |
rsync \
--archive \
--verbose \
--rsync-path="sudo rsync" \
--chown=root:root \
asset/nginx/rpm.lair.cafe.conf \
"gitea_ci@${RPM_REPO_HOST}:/etc/nginx/sites-available/rpm.lair.cafe.conf"
ssh "gitea_ci@${RPM_REPO_HOST}" "sudo nginx -t && sudo systemctl reload nginx"