From 65da71e309c82920a5f97242130b6c107a647e4d Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Sun, 11 Jun 2023 21:53:06 +0200 Subject: [PATCH 1/9] refactor: Use more descriptive naming --- .github/workflows/lighthouse-report.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lighthouse-report.yaml b/.github/workflows/lighthouse-report.yaml index 2427a0a..6760b4a 100644 --- a/.github/workflows/lighthouse-report.yaml +++ b/.github/workflows/lighthouse-report.yaml @@ -40,7 +40,7 @@ jobs: - name: Install Dependencies run: yarn global add @unlighthouse/cli puppeteer - - name: vercel-preview-url + - name: Retrieve Vercel Preview URL uses: zentered/vercel-preview-url@v1.1.9 id: vercel_preview_url env: @@ -48,8 +48,8 @@ jobs: with: vercel_project_id: ${{ vars.VERCEL_PROJECT_ID }} - - uses: UnlyEd/github-action-await-vercel@v1.2.39 - id: await-vercel + - name: Await Vercel Deployment + uses: UnlyEd/github-action-await-vercel@v1.2.39 env: VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} with: From bdcde61ab2437a86a195b4aef685f1cc93d30d7c Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Sun, 11 Jun 2023 23:03:26 +0200 Subject: [PATCH 2/9] feat: Added `gh-pages` cleanup deleted branches --- .github/workflows/gh-pages-cleanup.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/gh-pages-cleanup.yaml diff --git a/.github/workflows/gh-pages-cleanup.yaml b/.github/workflows/gh-pages-cleanup.yaml new file mode 100644 index 0000000..ac19580 --- /dev/null +++ b/.github/workflows/gh-pages-cleanup.yaml @@ -0,0 +1,25 @@ +name: Cleanup Directory on Branch Deletion + +on: + delete + +jobs: + cleanup: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Delete directory in gh-pages + if: github.event.ref_type == 'branch' + run: | + branchName=$(echo "${{ github.ref }}" | sed -e 's,^refs/heads/,,') + if [ -d "./.unlighthouse/${branchName}" ]; then + git fetch --all + git checkout gh-pages + git rm -rf --ignore-unmatch "${branchName}" + git commit -m "Cleanup directory for deleted branch ${branchName}" + git push origin gh-pages + else + echo "Directory doesn't exist for branch ${branchName}" + fi From da2db9fd507f99127cce912f091d6681391d8f3f Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Sun, 11 Jun 2023 23:09:26 +0200 Subject: [PATCH 3/9] fix: Give linter check write permission --- .github/workflows/lint-deps-check.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint-deps-check.yaml b/.github/workflows/lint-deps-check.yaml index ac91874..33105f7 100644 --- a/.github/workflows/lint-deps-check.yaml +++ b/.github/workflows/lint-deps-check.yaml @@ -8,6 +8,9 @@ on: branches: - main +permissions: + checks: write + jobs: run-checks: name: Run checks From c4b1f5dc96e8ef3045916ceeeb917bf46e947b83 Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Sun, 11 Jun 2023 23:10:09 +0200 Subject: [PATCH 4/9] fix: Add content write permissions --- .github/workflows/gh-pages-cleanup.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/gh-pages-cleanup.yaml b/.github/workflows/gh-pages-cleanup.yaml index ac19580..8c4da5c 100644 --- a/.github/workflows/gh-pages-cleanup.yaml +++ b/.github/workflows/gh-pages-cleanup.yaml @@ -3,6 +3,9 @@ name: Cleanup Directory on Branch Deletion on: delete +permissions: + contents: write + jobs: cleanup: runs-on: ubuntu-latest From 295d5ca8e56c21bee804b52f9691f023f4e6aab4 Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Sun, 11 Jun 2023 23:30:36 +0200 Subject: [PATCH 5/9] feat: Ignore `.unlighthouse` with Prettier --- .prettierignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.prettierignore b/.prettierignore index c1bcfde..41d5b58 100644 --- a/.prettierignore +++ b/.prettierignore @@ -11,3 +11,4 @@ node_modules build .contentlayer .github +.unlighthouse From 8ac7862393c06653e451e4e3e46596e04aa02c1f Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Sun, 11 Jun 2023 23:31:04 +0200 Subject: [PATCH 6/9] refactor: Change the Prettier format glob --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f1e4607..70330a0 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "lint": "next lint", "preview": "next build && next start", "typecheck": "tsc --noEmit", - "format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache", - "format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache" + "format:write": "prettier . --write --cache", + "format:check": "prettier . --check --cache" }, "dependencies": { "@clerk/clerk-react": "^4.18.0", From 48dbf5cb3c2c1d34296f7d84ef65cd1296667144 Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Sun, 11 Jun 2023 23:31:53 +0200 Subject: [PATCH 7/9] refactor: Resolved issuesd found by Prettier --- README.md | 1 - app/(landing)/css/additional-styles/theme.css | 131 +++++++++--------- app/(landing)/css/style.css | 15 +- next.config.js | 4 +- tailwind.config.js | 12 +- 5 files changed, 83 insertions(+), 80 deletions(-) diff --git a/README.md b/README.md index 48a611f..1fa5257 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@
- ## Installation To install the project and its dependencies, follow these steps: diff --git a/app/(landing)/css/additional-styles/theme.css b/app/(landing)/css/additional-styles/theme.css index afe3f08..edcd5c7 100644 --- a/app/(landing)/css/additional-styles/theme.css +++ b/app/(landing)/css/additional-styles/theme.css @@ -1,83 +1,82 @@ - /* Custom AOS distance */ @media screen { - html:not(.no-js) [data-aos=fade-up] { - -webkit-transform: translate3d(0, 14px, 0); - transform: translate3d(0, 14px, 0); - } + html:not(.no-js) [data-aos="fade-up"] { + -webkit-transform: translate3d(0, 14px, 0); + transform: translate3d(0, 14px, 0); + } - html:not(.no-js) [data-aos=fade-down] { - -webkit-transform: translate3d(0, -14px, 0); - transform: translate3d(0, -14px, 0); - } + html:not(.no-js) [data-aos="fade-down"] { + -webkit-transform: translate3d(0, -14px, 0); + transform: translate3d(0, -14px, 0); + } - html:not(.no-js) [data-aos=fade-right] { - -webkit-transform: translate3d(-14px, 0, 0); - transform: translate3d(-14px, 0, 0); - } + html:not(.no-js) [data-aos="fade-right"] { + -webkit-transform: translate3d(-14px, 0, 0); + transform: translate3d(-14px, 0, 0); + } - html:not(.no-js) [data-aos=fade-left] { - -webkit-transform: translate3d(14px, 0, 0); - transform: translate3d(14px, 0, 0); - } + html:not(.no-js) [data-aos="fade-left"] { + -webkit-transform: translate3d(14px, 0, 0); + transform: translate3d(14px, 0, 0); + } - html:not(.no-js) [data-aos=fade-up-right] { - -webkit-transform: translate3d(-14px, 14px, 0); - transform: translate3d(-14px, 14px, 0); - } + html:not(.no-js) [data-aos="fade-up-right"] { + -webkit-transform: translate3d(-14px, 14px, 0); + transform: translate3d(-14px, 14px, 0); + } - html:not(.no-js) [data-aos=fade-up-left] { - -webkit-transform: translate3d(14px, 14px, 0); - transform: translate3d(14px, 14px, 0); - } + html:not(.no-js) [data-aos="fade-up-left"] { + -webkit-transform: translate3d(14px, 14px, 0); + transform: translate3d(14px, 14px, 0); + } - html:not(.no-js) [data-aos=fade-down-right] { - -webkit-transform: translate3d(-14px, -14px, 0); - transform: translate3d(-14px, -14px, 0); - } + html:not(.no-js) [data-aos="fade-down-right"] { + -webkit-transform: translate3d(-14px, -14px, 0); + transform: translate3d(-14px, -14px, 0); + } - html:not(.no-js) [data-aos=fade-down-left] { - -webkit-transform: translate3d(14px, -14px, 0); - transform: translate3d(14px, -14px, 0); - } + html:not(.no-js) [data-aos="fade-down-left"] { + -webkit-transform: translate3d(14px, -14px, 0); + transform: translate3d(14px, -14px, 0); + } - html:not(.no-js) [data-aos=zoom-in-up] { - -webkit-transform: translate3d(0, 14px, 0) scale(.6); - transform: translate3d(0, 14px, 0) scale(.6); - } + html:not(.no-js) [data-aos="zoom-in-up"] { + -webkit-transform: translate3d(0, 14px, 0) scale(0.6); + transform: translate3d(0, 14px, 0) scale(0.6); + } - html:not(.no-js) [data-aos=zoom-in-down] { - -webkit-transform: translate3d(0, -14px, 0) scale(.6); - transform: translate3d(0, -14px, 0) scale(.6); - } + html:not(.no-js) [data-aos="zoom-in-down"] { + -webkit-transform: translate3d(0, -14px, 0) scale(0.6); + transform: translate3d(0, -14px, 0) scale(0.6); + } - html:not(.no-js) [data-aos=zoom-in-right] { - -webkit-transform: translate3d(-14px, 0, 0) scale(.6); - transform: translate3d(-14px, 0, 0) scale(.6); - } + html:not(.no-js) [data-aos="zoom-in-right"] { + -webkit-transform: translate3d(-14px, 0, 0) scale(0.6); + transform: translate3d(-14px, 0, 0) scale(0.6); + } - html:not(.no-js) [data-aos=zoom-in-left] { - -webkit-transform: translate3d(14px, 0, 0) scale(.6); - transform: translate3d(14px, 0, 0) scale(.6); - } + html:not(.no-js) [data-aos="zoom-in-left"] { + -webkit-transform: translate3d(14px, 0, 0) scale(0.6); + transform: translate3d(14px, 0, 0) scale(0.6); + } - html:not(.no-js) [data-aos=zoom-out-up] { - -webkit-transform: translate3d(0, 14px, 0) scale(1.2); - transform: translate3d(0, 14px, 0) scale(1.2); - } + html:not(.no-js) [data-aos="zoom-out-up"] { + -webkit-transform: translate3d(0, 14px, 0) scale(1.2); + transform: translate3d(0, 14px, 0) scale(1.2); + } - html:not(.no-js) [data-aos=zoom-out-down] { - -webkit-transform: translate3d(0, -14px, 0) scale(1.2); - transform: translate3d(0, -14px, 0) scale(1.2); - } + html:not(.no-js) [data-aos="zoom-out-down"] { + -webkit-transform: translate3d(0, -14px, 0) scale(1.2); + transform: translate3d(0, -14px, 0) scale(1.2); + } - html:not(.no-js) [data-aos=zoom-out-right] { - -webkit-transform: translate3d(-14px, 0, 0) scale(1.2); - transform: translate3d(-14px, 0, 0) scale(1.2); - } + html:not(.no-js) [data-aos="zoom-out-right"] { + -webkit-transform: translate3d(-14px, 0, 0) scale(1.2); + transform: translate3d(-14px, 0, 0) scale(1.2); + } - html:not(.no-js) [data-aos=zoom-out-left] { - -webkit-transform: translate3d(14px, 0, 0) scale(1.2); - transform: translate3d(14px, 0, 0) scale(1.2); - } -} \ No newline at end of file + html:not(.no-js) [data-aos="zoom-out-left"] { + -webkit-transform: translate3d(14px, 0, 0) scale(1.2); + transform: translate3d(14px, 0, 0) scale(1.2); + } +} diff --git a/app/(landing)/css/style.css b/app/(landing)/css/style.css index 5bd9cac..2f68700 100644 --- a/app/(landing)/css/style.css +++ b/app/(landing)/css/style.css @@ -1,14 +1,13 @@ -@import 'tailwindcss/base'; -@import 'tailwindcss/components'; +@import "tailwindcss/base"; +@import "tailwindcss/components"; -@import 'additional-styles/theme.css'; +@import "additional-styles/theme.css"; -@import 'tailwindcss/utilities'; +@import "tailwindcss/utilities"; /* Additional Tailwind directives: https://tailwindcss.com/docs/functions-and-directives/#responsive */ @layer utilities { - .rtl { - direction: rtl; - } + .rtl { + direction: rtl; + } } - diff --git a/next.config.js b/next.config.js index 9181109..e5957bb 100644 --- a/next.config.js +++ b/next.config.js @@ -4,6 +4,6 @@ const nextConfig = { experimental: { appDir: true, }, -} +}; -module.exports = nextConfig +module.exports = nextConfig; diff --git a/tailwind.config.js b/tailwind.config.js index a1280fb..1500c43 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -4,7 +4,11 @@ const colors = require("tailwindcss/colors"); /** @type {import('tailwindcss').Config} */ module.exports = { darkMode: ["class"], - content: ["app/**/*.{ts,tsx}", "components/**/*.{ts,tsx}", "content/**/*.mdx"], + content: [ + "app/**/*.{ts,tsx}", + "components/**/*.{ts,tsx}", + "content/**/*.mdx", + ], theme: { container: { center: true, @@ -23,8 +27,10 @@ module.exports = { }, backgroundImage: { - "gradient-conic": "conic-gradient(var(--conic-position), var(--tw-gradient-stops))", - "gradient-radial-top": "radial-gradient(100% 60% at 100% 0%, var(--tw-gradient-stops))", + "gradient-conic": + "conic-gradient(var(--conic-position), var(--tw-gradient-stops))", + "gradient-radial-top": + "radial-gradient(100% 60% at 100% 0%, var(--tw-gradient-stops))", }, keyframes: { "accordion-down": { From 0e149cdad7efba66b5f6c733abe3912e07b15231 Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Mon, 12 Jun 2023 00:50:06 +0200 Subject: [PATCH 8/9] chore: Change name, pinned versions, Node 18 --- .github/workflows/gh-pages-cleanup.yaml | 4 ++-- .github/workflows/lint-deps-check.yaml | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gh-pages-cleanup.yaml b/.github/workflows/gh-pages-cleanup.yaml index 8c4da5c..73370d9 100644 --- a/.github/workflows/gh-pages-cleanup.yaml +++ b/.github/workflows/gh-pages-cleanup.yaml @@ -1,4 +1,4 @@ -name: Cleanup Directory on Branch Deletion +name: Cleanup GitHub Pages on Branch Deletion on: delete @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3.5.3 - name: Delete directory in gh-pages if: github.event.ref_type == 'branch' diff --git a/.github/workflows/lint-deps-check.yaml b/.github/workflows/lint-deps-check.yaml index 33105f7..20b5343 100644 --- a/.github/workflows/lint-deps-check.yaml +++ b/.github/workflows/lint-deps-check.yaml @@ -10,6 +10,7 @@ on: permissions: checks: write + contents: write jobs: run-checks: @@ -18,18 +19,18 @@ jobs: steps: - name: Check out Git repository - uses: actions/checkout@v2 + uses: actions/checkout@v3.5.3 - name: Set up Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v3.6.0 with: - node-version: 20 + node-version: 18 - name: Install Node.js dependencies run: yarn install --frozen-lockfile - name: Run linters - uses: wearerequired/lint-action@v2 + uses: wearerequired/lint-action@v2.3.0 with: eslint: true prettier: true From 8ce6ca35414dc4d7677127ed017e20ca0985e476 Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Mon, 12 Jun 2023 00:59:12 +0200 Subject: [PATCH 9/9] feat: Added Overall scores --- .github/workflows/lighthouse-report.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lighthouse-report.yaml b/.github/workflows/lighthouse-report.yaml index 6760b4a..51372a7 100644 --- a/.github/workflows/lighthouse-report.yaml +++ b/.github/workflows/lighthouse-report.yaml @@ -96,12 +96,13 @@ jobs: `| Accessibility | ${score(result.summary.categories.accessibility.averageScore)} |`, `| Best practices | ${score(result.summary.categories['best-practices'].averageScore)} |`, `| SEO | ${score(result.summary.categories.seo.averageScore)} |`, + `| *Overall* | ${score(result.summary.score)} |`, '', '*Lighthouse scores for individual routes:*', '', - '| Path | Performance | Accessibility | Best practices | SEO |', - '| --- | --- | --- | --- | --- |', - `${result.routes.map(route => `| ${route.path} | ${score(route.categories.performance.score)} | ${score(route.categories.accessibility.score)} | ${score(route.categories['best-practices'].score)} | ${score(route.categories.seo.score)} |`).join('\n')}`, + '| Path | Performance | Accessibility | Best practices | SEO | Overall |', + '| --- | --- | --- | --- | --- | --- |', + `${result.routes.map(route => `| ${route.path} | ${score(route.categories.performance.score)} | ${score(route.categories.accessibility.score)} | ${score(route.categories['best-practices'].score)} | ${score(route.categories.seo.score)} | ${score(route.score)} |`).join('\n')}`, '', '*Lighthouse metrics:*', '',