This commit is contained in:
resonic-user 2025-06-16 10:14:55 +00:00
parent 836d6458bb
commit 0798ca8847

View File

@ -25,7 +25,13 @@ jobs:
env:
LOCK_HASH: ${{ hashFiles('backend/yarn.lock', 'webapp/yarn.lock') }}
- name: Show lockfile hashes (debug)
run: |
echo "backend/yarn.lock hash: ${{ hashFiles('backend/yarn.lock') }}"
echo "webapp/yarn.lock hash: ${{ hashFiles('webapp/yarn.lock') }}"
- name: Restore node_modules cache
id: restore-cache
uses: actions/cache@v4
with:
path: |
@ -36,6 +42,9 @@ jobs:
node-modules-${{ runner.os }}-
node-modules-
- name: Show cache hit status
run: echo "Cache hit: ${{ steps.restore-cache.outputs.cache-hit }}"
- name: Install backend deps
run: |
cd backend
@ -48,13 +57,15 @@ jobs:
yarn install
yarn build
- name: Serve static webapp if build output exists
- name: Start webapp (static or fallback)
run: |
if [ -d "webapp/out" ]; then
echo "Starting static server for webapp/out..."
echo "Serving webapp/out statically..."
npx serve -s webapp/out -l 3000 &
else
echo "⚠️ webapp/out does not exist. Skipping server start."
echo "webapp/out not found falling back to yarn start..."
cd webapp
yarn start &
fi
- name: Test HTTP wait logic
@ -65,4 +76,4 @@ jobs:
echo "Attempt $i failed. Retrying..."
sleep 2
done
echo "❌ Service did not respond in time." && exit 1
echo "❌ Service did not respond in time." && exit 1