From 71f11906386597bd0f10ddfae5ffede2e5db988e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ju=C5=99i=C4=8Dka?= Date: Sat, 9 Mar 2024 13:28:07 +0100 Subject: [PATCH 1/8] Auto stash before rebase of "feature/lighthouse" onto "origin/main" --- ...hosting-pull-request.yml => pull-request.yml} | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) rename .github/workflows/{firebase-hosting-pull-request.yml => pull-request.yml} (55%) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/pull-request.yml similarity index 55% rename from .github/workflows/firebase-hosting-pull-request.yml rename to .github/workflows/pull-request.yml index 949cfd4..a646098 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -2,16 +2,30 @@ # https://github.com/firebase/firebase-tools name: Deploy to Firebase Hosting on PR -'on': pull_request +on: pull_request jobs: build_and_preview: + name: 'Build web and deploy preview' if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: npm ci && npm run build - uses: FirebaseExtended/action-hosting-deploy@v0 + id: action-hosting-deploy with: repoToken: '${{ secrets.GITHUB_TOKEN }}' firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SU_MAINWEB }}' projectId: su-mainweb + outputs: + urls: ${{ steps.action-hosting-deploy.outputs.urls }} + lighthouse: + name: 'Run lighthouse check on preview' + runs-on: ubuntu-latest + needs: build_and_preview + steps: + - uses: actions/checkout@master + - name: Lighthouse + uses: foo-software/lighthouse-check-action@master + with: + urls: ${{ fromJson(needs.job1.outputs.urls)[0] }} From cbd54f4d12689778ef97a65cd066fe68c38b9a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ju=C5=99i=C4=8Dka?= Date: Sat, 9 Mar 2024 13:30:56 +0100 Subject: [PATCH 2/8] FIX --- .github/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index a646098..c284ca8 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -28,4 +28,4 @@ jobs: - name: Lighthouse uses: foo-software/lighthouse-check-action@master with: - urls: ${{ fromJson(needs.job1.outputs.urls)[0] }} + urls: ${{ fromJson(needs.build_and_preview.outputs.urls)[0] }} From 0c7ac80192714835d44fbcb2873d10360dd705a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ju=C5=99i=C4=8Dka?= Date: Sat, 9 Mar 2024 13:36:02 +0100 Subject: [PATCH 3/8] GH token --- .github/workflows/pull-request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index c284ca8..476cdb0 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -29,3 +29,4 @@ jobs: uses: foo-software/lighthouse-check-action@master with: urls: ${{ fromJson(needs.build_and_preview.outputs.urls)[0] }} + gitHubAccessToken: '${{ secrets.GITHUB_TOKEN }}' From 06fabf493254d06b7f6bdc964c04078ee03ebaf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ju=C5=99i=C4=8Dka?= Date: Sat, 9 Mar 2024 13:36:32 +0100 Subject: [PATCH 4/8] Enable PR comment --- .github/workflows/pull-request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 476cdb0..51b641e 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -30,3 +30,4 @@ jobs: with: urls: ${{ fromJson(needs.build_and_preview.outputs.urls)[0] }} gitHubAccessToken: '${{ secrets.GITHUB_TOKEN }}' + prCommentEnabled: true From 53c66744e212222826d7719ff4731c06dfcbed2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ju=C5=99i=C4=8Dka?= Date: Sat, 9 Mar 2024 13:39:41 +0100 Subject: [PATCH 5/8] Upload report --- .github/workflows/pull-request.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 51b641e..8f0bb74 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -31,3 +31,9 @@ jobs: urls: ${{ fromJson(needs.build_and_preview.outputs.urls)[0] }} gitHubAccessToken: '${{ secrets.GITHUB_TOKEN }}' prCommentEnabled: true + outputDirectory: ${{ github.workspace }}/tmp/artifacts + - name: Upload lighthouse report + uses: actions/upload-artifact@master + with: + name: Lighthouse reports + path: ${{ github.workspace }}/tmp/artifacts From e6ca738d1d33546872bb85024dee15a1774f703b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ju=C5=99i=C4=8Dka?= Date: Sat, 9 Mar 2024 13:40:48 +0100 Subject: [PATCH 6/8] Fix --- .github/workflows/pull-request.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 8f0bb74..684f253 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -31,9 +31,9 @@ jobs: urls: ${{ fromJson(needs.build_and_preview.outputs.urls)[0] }} gitHubAccessToken: '${{ secrets.GITHUB_TOKEN }}' prCommentEnabled: true - outputDirectory: ${{ github.workspace }}/tmp/artifacts - - name: Upload lighthouse report - uses: actions/upload-artifact@master - with: - name: Lighthouse reports - path: ${{ github.workspace }}/tmp/artifacts + outputDirectory: ${{ github.workspace }}/tmp/artifacts + - name: Upload lighthouse report + uses: actions/upload-artifact@master + with: + name: Lighthouse reports + path: ${{ github.workspace }}/tmp/artifacts From 7e92b034eda464e0fe837681dd5010e314f11511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ju=C5=99i=C4=8Dka?= Date: Sat, 9 Mar 2024 13:43:17 +0100 Subject: [PATCH 7/8] Fix --- .github/workflows/pull-request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 684f253..f8136f1 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -25,6 +25,7 @@ jobs: needs: build_and_preview steps: - uses: actions/checkout@master + - run: mkdir -p ${{ github.workspace }}/tmp/artifacts - name: Lighthouse uses: foo-software/lighthouse-check-action@master with: From bd16196275cae19e56aef6d948da6fb6479d7e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ju=C5=99i=C4=8Dka?= Date: Sat, 9 Mar 2024 13:48:17 +0100 Subject: [PATCH 8/8] Final touch --- .github/workflows/pull-request.yml | 9 +++++++++ src/components/organisms/Footer.astro | 4 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index f8136f1..e8dd2dd 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -28,6 +28,7 @@ jobs: - run: mkdir -p ${{ github.workspace }}/tmp/artifacts - name: Lighthouse uses: foo-software/lighthouse-check-action@master + id: lighthouseCheck with: urls: ${{ fromJson(needs.build_and_preview.outputs.urls)[0] }} gitHubAccessToken: '${{ secrets.GITHUB_TOKEN }}' @@ -38,3 +39,11 @@ jobs: with: name: Lighthouse reports path: ${{ github.workspace }}/tmp/artifacts + - name: Verify Lighthouse Check results + uses: foo-software/lighthouse-check-status-action@master + with: + lighthouseCheckResults: ${{ steps.lighthouseCheck.outputs.lighthouseCheckResults }} + minAccessibilityScore: '50' + minBestPracticesScore: '50' + minPerformanceScore: '50' + minSeoScore: '50' diff --git a/src/components/organisms/Footer.astro b/src/components/organisms/Footer.astro index 0aa9609..58632d0 100644 --- a/src/components/organisms/Footer.astro +++ b/src/components/organisms/Footer.astro @@ -51,9 +51,7 @@ import { SuLogo } from '../atoms/SuLogo';
- +
Již brzy