38 lines
955 B
YAML
38 lines
955 B
YAML
|
|
name: Build and Deploy Frontend
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- feature/ci-cd
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: debian12
|
|
container:
|
|
image: git.vxbard.net/homeburger/bard-cpp-builder:1.0
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Validate Registry
|
|
run: |
|
|
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.vxbard.net \
|
|
-u ${{ secrets.REGISTRY_USERNAME }} \
|
|
--password-stdin
|
|
|
|
- name: Build image
|
|
run: |
|
|
docker build -t git.vxbard.net/homeburger/agologum-client:latest ./client
|
|
|
|
- name: Push
|
|
run: |
|
|
docker push git.vxbard.net/homeburger/agologum-client:latest
|
|
|
|
- name: Deploy
|
|
run: |
|
|
docker compose -f ./client/docker-compose.prod.yaml pull agologum-client
|
|
docker compose -f ./client/docker-compose.prod.yaml up -d --force-recreate agologum-client
|