The fedora-43 base image now includes nodejs and npm, so the nvm runner label and Node.js setup step are no longer needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
name: deploy-ui
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "ui/**"
|
|
- ".gitea/workflows/deploy-ui.yml"
|
|
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: |
|
|
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 \
|
|
--recursive \
|
|
--links \
|
|
--verbose \
|
|
--delete \
|
|
--chmod D755,F644 \
|
|
--include="index.html" \
|
|
--include="assets/***" \
|
|
--exclude="*" \
|
|
ui/dist/ \
|
|
"gitea_ci@${RPM_REPO_HOST}:/var/www/rpm/"
|