Add alert_historian to SonarQube #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |