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/"