diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index aaba334..f011251 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -16,21 +16,25 @@ jobs: - name: Check out the pushed revision uses: https://github.com/actions/checkout@v4 - - name: Install dependencies - run: npm ci - - - name: Verify checked-out source + # Host-mode action workspaces are ephemeral runner internals. Copy the checked-out SHA + # to a normal writable path so Node tests and Docker Compose see the same source tree. + - name: Prepare isolated build directory run: | - pwd - test -f public/landing.html - test -f public/login.html - test -f test/auth.test.js + export CI_WORKDIR="/tmp/roast-command-center-${GITHUB_RUN_ID}" + rm -rf "$CI_WORKDIR" + mkdir -p "$CI_WORKDIR" + cp -a ./. "$CI_WORKDIR/" + echo "CI_WORKDIR=$CI_WORKDIR" >> "$GITHUB_ENV" + + - name: Install dependencies + run: cd "$CI_WORKDIR" && npm ci - name: Test - run: npm test + run: cd "$CI_WORKDIR" && npm test - name: Deploy to Unraid Docker run: | + cd "$CI_WORKDIR" docker compose \ --project-name roast_command_center \ --env-file /run/roast-production.env \ @@ -39,6 +43,7 @@ jobs: - name: Verify the running container run: | + cd "$CI_WORKDIR" docker compose \ --project-name roast_command_center \ --env-file /run/roast-production.env \