25 lines
909 B
YAML
25 lines
909 B
YAML
name: build-and-deploy
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://code.forgejo.org/actions/checkout@v4
|
|
- name: Build and deploy on the Pi (local docker)
|
|
env:
|
|
# force a stable compose project name so container names stay
|
|
# consistent (osint-app, osint-db, ...) regardless of checkout path
|
|
COMPOSE_PROJECT_NAME: osint
|
|
run: |
|
|
set -ex
|
|
# The forgejo-runner runs on the Pi with /var/run/docker.sock and
|
|
# /opt/siriusdevops mounted, so we build + deploy LOCALLY — no SSH/scp.
|
|
# Deploy straight from the checked-out workspace.
|
|
cd "${GITHUB_WORKSPACE}"
|
|
docker compose build --no-cache
|
|
docker compose up -d --force-recreate
|
|
docker image prune -f
|
|
echo 'osint-dashboard deployed (local)'
|