Skip to content

Add alert_historian to SonarQube #12

Add alert_historian to SonarQube

Add alert_historian to SonarQube #12

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
deployment:
runs-on: ubuntu-latest
steps:
- name: Check deploy secrets
id: check_secrets
env:
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
SSHKEY: ${{ secrets.SSHKEY }}
PORT: ${{ secrets.PORT }}
run: |
missing=false
for var in HOST USERNAME SSHKEY PORT; do
if [ -z "${!var}" ]; then
echo "Missing required secret: $var"
missing=true
fi
done
if [ "$missing" = "true" ]; then
echo "can_deploy=false" >> "$GITHUB_OUTPUT"
echo "Deploy skipped because required secrets are not configured."
else
echo "can_deploy=true" >> "$GITHUB_OUTPUT"
fi
- name: Deploy Docker Compose
if: ${{ steps.check_secrets.outputs.can_deploy == 'true' }}
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PORT: ${{ secrets.PORT }}
KEY: ${{ secrets.SSHKEY }}
script: ./FindFirst/deploy/deploy.sh