Skip to content

Commit 0493630

Browse files
committed
Chore: Revert "Add lighthouse to build workflow (#400)"
This reverts commit e871c60.
1 parent e871c60 commit 0493630

File tree

6 files changed

+1
-2884
lines changed

6 files changed

+1
-2884
lines changed

.github/workflows/build-push.yml

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ on:
88
env:
99
REPO_OWNER: "nginx"
1010
REPO_NAME: "documentation"
11-
FRONT_DOOR_USERNAME: ${{ secrets.FRONT_DOOR_USERNAME }}
12-
FRONT_DOOR_PASSWORD: ${{ secrets.FRONT_DOOR_PASSWORD }}
13-
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
1411

1512
jobs:
1613
deploy-example-site:
@@ -27,49 +24,4 @@ jobs:
2724
auto_deploy_env: "prod"
2825
secrets:
2926
AZURE_CREDENTIALS: ${{secrets.AZURE_CREDENTIALS_DOCS}}
30-
AZURE_KEY_VAULT: ${{secrets.AZURE_KEY_VAULT_DOCS}}
31-
lighthouseci:
32-
if: github.event.pull_request
33-
needs: call-docs-build-push
34-
runs-on: ubuntu-22.04
35-
steps:
36-
- uses: actions/checkout@v5
37-
with:
38-
ref: ${{ github.event.workflow_run.head_branch }}
39-
- uses: actions/setup-node@v5
40-
with:
41-
node-version: 18
42-
- name: Installing packages
43-
run: npm ci
44-
- name: Generating lighthouse reports for PR and main...
45-
run: |
46-
node performance/lighthouse-script.js
47-
- name: Compare the artifacts for negative differences in performance
48-
continue-on-error: true
49-
run: |
50-
FIELDS=("performance" "accessibility")
51-
for FIELD in "${FIELDS[@]}"; do
52-
PR_VALUE=$(cat lighthouse-reports/pr-report.json | jq -r ".categories.$FIELD.score")
53-
MAIN_VALUE=$(cat lighthouse-reports/main-report.json | jq -r ".categories.$FIELD.score")
54-
echo "$FIELD: PR - $PR_VALUE | Main - $MAIN_VALUE"
55-
56-
if [ $FIELD = "performance" ]; then
57-
LOWER_BOUND=$(echo "$MAIN_VALUE - 0.05" | bc)
58-
UPPER_BOUND=$(echo "$MAIN_VALUE + 0.05" | bc)
59-
if (( $(echo "$PR_VALUE < $LOWER_BOUND" | bc -l) || $(echo "$PR_VALUE > $UPPER_BOUND" | bc -l) )); then
60-
echo "Error: $FIELD score in PR ($PR_VALUE) is less than in MAIN ($MAIN_VALUE)"
61-
exit 1
62-
fi
63-
else
64-
if (( $(echo "$PR_VALUE < $MAIN_VALUE" | bc -l) )); then
65-
echo "Error: $FIELD score in PR ($PR_VALUE) is less than in MAIN ($MAIN_VALUE)"
66-
exit 1
67-
fi
68-
fi
69-
done
70-
- uses: actions/upload-artifact@v4
71-
if: ${{ !cancelled() }}
72-
with:
73-
name: lighthouse-reports
74-
path: lighthouse-reports/
75-
retention-days: 30
27+
AZURE_KEY_VAULT: ${{secrets.AZURE_KEY_VAULT_DOCS}}

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,3 @@ exampleSite/hugo
3737

3838
# Biome
3939
biome.rb
40-
41-
# Local Lighthouse artifacts
42-
*/lighthouse-reports

performance/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

performance/lighthouse-script.js

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)