All checks were successful
deploy / build-and-deploy (push) Successful in 31s
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).
50 lines
1.3 KiB
YAML
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/"
|