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
|
- name: Checkout
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
- name: Build and deploy on the Pi (local docker)
|
- 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: |
|
run: |
|
||||||
set -e
|
set -ex
|
||||||
# The forgejo-runner runs on the Pi with /var/run/docker.sock and
|
# The forgejo-runner runs on the Pi with /var/run/docker.sock and
|
||||||
# /opt/siriusdevops mounted, so we deploy locally — no SSH/scp needed.
|
# /opt/siriusdevops mounted, so we build + deploy LOCALLY — no SSH/scp.
|
||||||
BUILD_DIR=/opt/siriusdevops/build/osint-dashboard
|
# Deploy straight from the checked-out workspace.
|
||||||
rm -rf "$BUILD_DIR"
|
cd "${GITHUB_WORKSPACE}"
|
||||||
mkdir -p "$BUILD_DIR"
|
|
||||||
# ship checked-out source into the build dir (local fs copy)
|
|
||||||
cp -r "${GITHUB_WORKSPACE}/." "$BUILD_DIR/"
|
|
||||||
cd "$BUILD_DIR"
|
|
||||||
docker compose build --no-cache
|
docker compose build --no-cache
|
||||||
docker compose up -d --force-recreate
|
docker compose up -d --force-recreate
|
||||||
docker image prune -f
|
docker image prune -f
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue