preliminary ci/cd setup (horrors await me)
This commit is contained in:
32
.gitea/workflows/deploy-api.yaml
Normal file
32
.gitea/workflows/deploy-api.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
name: Build and Deploy API
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: docker
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Validate Registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login git.bxvard.net -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
docker build -t git.bxvard.net/homeburger/agologum-api:latest ./api
|
||||
|
||||
- name: Push image
|
||||
run: |
|
||||
docker push git.vxbard.net/homeburger/agologum-api:latest
|
||||
|
||||
- name: Deploy container
|
||||
run: |
|
||||
docker compose -f docker-compose.prod.yaml pull agologum-api
|
||||
docker compose -f docker-compose.prod.yaml up -d agologum-api
|
||||
Reference in New Issue
Block a user