feat: Add GitHub Actions workflows for building and deploying frontend and backend services

This commit is contained in:
2025-12-27 00:47:49 +01:00
parent 8f3c652299
commit 462c506699
2 changed files with 51 additions and 28 deletions
+51
View File
@@ -0,0 +1,51 @@
name: Build and Deploy Frontend
on:
push:
branches: [ "main" ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: starappeal/matrix-frontend
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/${{ env.IMAGE_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Deploy via SSH
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
envs: GHCR_PAT
script: |
cd /home/matrix/ledmatrix-deployment
docker compose -f docker-compose.yml -f docker-compose.prod.yml pull frontend
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
docker image prune -f
env:
GHCR_PAT: ${{ secrets.GHCR_PAT }}
-28
View File
@@ -1,28 +0,0 @@
name: Qodana
on:
workflow_dispatch:
pull_request:
push:
branches: # Specify your branches here
- main # The 'main' branch
- 'releases/*' # The release branches
jobs:
qodana:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
fetch-depth: 0 # a full history is required for pull request analysis
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2025.1
with:
pr-mode: false
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_1907308073 }}
QODANA_ENDPOINT: 'https://qodana.cloud'