Files
rpm.lair.cafe/.gitea/workflows/deploy.yml
grenade cc8c325c77
All checks were successful
deploy / build-and-deploy (push) Successful in 31s
Import rpm.lair.cafe SPA from lair/mistralrs-package/ui @34a28b5
Dedicated repo for the RPM repository web UI, moved out of the
mistralrs-package repo now that multiple package repos publish to
rpm.lair.cafe. Includes an adapted deploy workflow (SPA at repo root).
2026-07-02 11:11:47 +03:00

50 lines
1.3 KiB
YAML

name: deploy
on:
push:
branches: [main]
workflow_dispatch: {}
jobs:
build-and-deploy:
runs-on: fedora-43
env:
RPM_REPO_HOST: oolon.kosherinata.internal
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Build UI
run: 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 to web root
run: |
# Only the built SPA files are synced; --exclude="*" protects the
# co-located RPM trees (fedora/**, *.gpg, packages.json) from
# --delete (excluded files are not deletion candidates).
rsync \
--recursive \
--links \
--verbose \
--delete \
--chmod D755,F644 \
--include="index.html" \
--include="*.repo" \
--include="assets/***" \
--exclude="*" \
dist/ \
"gitea_ci@${RPM_REPO_HOST}:/var/www/rpm/"