add ci
Some checks failed
ci / docker_image (push) Failing after 1m58s
ci / deploy (push) Has been skipped

This commit is contained in:
Drake Marino 2026-01-24 11:43:25 -06:00
parent d074868e74
commit 7c1273e06c

45
.gitea/workflows/ci.yaml Normal file
View File

@ -0,0 +1,45 @@
name: ci
on:
push:
branches:
- main
jobs:
docker_image:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install Docker
run: curl -fsSL https://get.docker.com | sh
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: git.marinodev.com
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v6
with:
push: true
tags: git.marinodev.com/marinodev/fbla26_ci:latest
no-cache: true
deploy:
runs-on: ubuntu-latest
needs: docker_image
steps:
- name: Restart Service
uses: https://github.com/appleboy/ssh-action@v1.0.3
with:
host: ${{ vars.DEPLOY_HOST }}
username: ${{ vars.DEPLOY_USER }}
password: ${{ secrets.DEPLOY_PASSWORD }}
script: |
cd ${{ vars.DEPLOY_PATH }}
git pull
docker-compose down && docker-compose pull && docker-compose up -d