Files
SilverLABS 234c8b52cb fix(deploy): replace appleboy/ssh-action with sshpass for compatibility
The Docker-based appleboy/ssh-action fails with act runner due to
Alpine compatibility issues. Using direct sshpass commands avoids
Docker-in-Docker problems and works natively with the runner.
2026-01-20 22:47:40 +00:00

53 lines
1.7 KiB
YAML

name: Deploy via SilverDOCK
on:
workflow_dispatch:
inputs:
target_host:
description: 'Target Docker host'
required: true
default: '10.0.0.51'
hostname:
description: 'Hostname for the site'
required: true
default: 'privacyfirst.local'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Install sshpass
run: |
apt-get update && apt-get install -y sshpass
- name: Deploy SilverDOCK Container
env:
SSHPASS: ${{ secrets.SSHPASSWORD }}
TARGET_HOST: ${{ github.event.inputs.target_host }}
GITEA_TOKEN: ${{ secrets.GITEATOKEN }}
HOSTNAME: ${{ github.event.inputs.hostname }}
run: |
sshpass -e ssh -o StrictHostKeyChecking=no sysadmin@${TARGET_HOST} << 'ENDSSH'
# Login to Gitea container registry
docker login git.silverlabs.uk -u sysadmin -p ${GITEA_TOKEN}
# Pull latest SilverDOCK image
docker pull git.silverlabs.uk/silverlabs/silverdock:latest
# Stop and remove existing container
docker stop privacyfirst || true
docker rm privacyfirst || true
# Run SilverDOCK with privacyfirstwebsite repo
docker run -d \
--name privacyfirst \
--restart unless-stopped \
-p 5080:8080 \
-e REPOSITORY_URL=https://git.silverlabs.uk/SilverLABS/privacyfirstwebsite.git \
-e GIT_TOKEN=${GITEA_TOKEN} \
-e SILVERDOCK_UI_HOSTNAME=${HOSTNAME} \
-v privacyfirst-keys:/app/keys \
-v privacyfirst-source:/app/source \
git.silverlabs.uk/silverlabs/silverdock:latest
ENDSSH