feat: initial .NET 9 static site for SilverDOCK deployment
This commit is contained in:
46
.gitea/workflows/deploy.yml
Normal file
46
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
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: Deploy SilverDOCK Container
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ github.event.inputs.target_host }}
|
||||
username: sysadmin
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
script: |
|
||||
# Login to Gitea container registry
|
||||
docker login git.silverlabs.uk -u sysadmin -p ${{ secrets.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=${{ secrets.GITEA_TOKEN }} \
|
||||
-e SILVERDOCK_UI_HOSTNAME=${{ github.event.inputs.hostname }} \
|
||||
-v privacyfirst-keys:/app/keys \
|
||||
-v privacyfirst-source:/app/source \
|
||||
git.silverlabs.uk/silverlabs/silverdock:latest
|
||||
Reference in New Issue
Block a user