CI: deploy directly from checkout workspace (local docker), no cp/SSH; explicit COMPOSE_PROJECT_NAME
Some checks failed
build-and-deploy / build (push) Failing after 19s
Some checks failed
build-and-deploy / build (push) Failing after 19s
This commit is contained in:
parent
650ad27349
commit
6ddd773a75
1 changed files with 8 additions and 8 deletions
|
|
@ -9,16 +9,16 @@ jobs:
|
|||
- 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 -e
|
||||
set -ex
|
||||
# The forgejo-runner runs on the Pi with /var/run/docker.sock and
|
||||
# /opt/siriusdevops mounted, so we deploy locally — no SSH/scp needed.
|
||||
BUILD_DIR=/opt/siriusdevops/build/osint-dashboard
|
||||
rm -rf "$BUILD_DIR"
|
||||
mkdir -p "$BUILD_DIR"
|
||||
# ship checked-out source into the build dir (local fs copy)
|
||||
cp -r "${GITHUB_WORKSPACE}/." "$BUILD_DIR/"
|
||||
cd "$BUILD_DIR"
|
||||
# /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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue