lghthouse
Some checks failed
deploy to production / deploy (push) Failing after 1m30s

This commit is contained in:
Robin Grenzdörfer 2023-12-15 20:35:14 +00:00
parent 5e8335b3cb
commit a2b865cd15

View File

@ -100,24 +100,22 @@ jobs:
FORCE_COLOR: "true"
run: |
yarn build:legacy
- name: Wait for Live Server
run: |
attempts=0
max_attempts=2
while ! curl --output /dev/null --silent --head --fail http://live-server:8081; do
if [ $attempts -eq $max_attempts ]; then
echo "Live server not ready after $max_attempts attempts"
echo "${{ toJson(job) }}"
curl -v http://live-server:8081
exit 1
fi
attempts=$((attempts+1))
echo "Waiting for live-server to be ready... attempt $attempts"
sleep 5
done
attempts=0
max_attempts=2
while ! curl --output /dev/null --silent --head --fail http://live-server:8081; do
if [ $attempts -eq $max_attempts ]; then
echo "Live server not ready after $max_attempts attempts"
echo "${{ toJson(job) }}"
curl -v http://live-server:8081
exit 1
fi
attempts=$((attempts+1))
echo "Waiting for live-server to be ready... attempt $attempts"
sleep 5
done
- name: Test HTTP Request
run: |
@ -133,16 +131,16 @@ jobs:
- name: Install Chrome
run: |
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
sudo apt-get install -y google-chrome-stable
# Lighthouse Analysis Step
- name: Lighthouse Analysis
run: |
yarn add lighthouse
npx lighthouse http://127.0.0.1:8081 --output json --output-path /tmp/lighthouse-report.json --chrome-flags="--headless --no-sandbox --disable-dev-shm-usage"
yarn add lighthouse
npx lighthouse http://127.0.0.1:8081 --output json --output-path /tmp/lighthouse-report.json --chrome-flags="--headless --no-sandbox --disable-dev-shm-usage"
# Notify-Lighthouse Step
- name: Notify Lighthouse
@ -162,4 +160,5 @@ jobs:
RSYNC_PASS: ${{ secrets.rsync_master }}
run: |
scripts/deploy.sh ftp1.webmakers.de $RSYNC_USER $RSYNC_PASS
#
#