mirror of
https://github.com/bartvdbraak/omnidash.git
synced 2025-04-29 08:21:20 +00:00
Merge pull request #28 from bartvdbraak/feat/unlighthouse
Add Cleanup action for GitHub Pages on branch deletion
This commit is contained in:
commit
28be1df3d0
10 changed files with 129 additions and 92 deletions
28
.github/workflows/gh-pages-cleanup.yaml
vendored
Normal file
28
.github/workflows/gh-pages-cleanup.yaml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
name: Cleanup GitHub Pages on Branch Deletion
|
||||||
|
|
||||||
|
on:
|
||||||
|
delete
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cleanup:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3.5.3
|
||||||
|
|
||||||
|
- 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
|
13
.github/workflows/lighthouse-report.yaml
vendored
13
.github/workflows/lighthouse-report.yaml
vendored
|
@ -40,7 +40,7 @@ jobs:
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: yarn global add @unlighthouse/cli puppeteer
|
run: yarn global add @unlighthouse/cli puppeteer
|
||||||
|
|
||||||
- name: vercel-preview-url
|
- name: Retrieve Vercel Preview URL
|
||||||
uses: zentered/vercel-preview-url@v1.1.9
|
uses: zentered/vercel-preview-url@v1.1.9
|
||||||
id: vercel_preview_url
|
id: vercel_preview_url
|
||||||
env:
|
env:
|
||||||
|
@ -48,8 +48,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
vercel_project_id: ${{ vars.VERCEL_PROJECT_ID }}
|
vercel_project_id: ${{ vars.VERCEL_PROJECT_ID }}
|
||||||
|
|
||||||
- uses: UnlyEd/github-action-await-vercel@v1.2.39
|
- name: Await Vercel Deployment
|
||||||
id: await-vercel
|
uses: UnlyEd/github-action-await-vercel@v1.2.39
|
||||||
env:
|
env:
|
||||||
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
||||||
with:
|
with:
|
||||||
|
@ -96,12 +96,13 @@ jobs:
|
||||||
`| Accessibility | ${score(result.summary.categories.accessibility.averageScore)} |`,
|
`| Accessibility | ${score(result.summary.categories.accessibility.averageScore)} |`,
|
||||||
`| Best practices | ${score(result.summary.categories['best-practices'].averageScore)} |`,
|
`| Best practices | ${score(result.summary.categories['best-practices'].averageScore)} |`,
|
||||||
`| SEO | ${score(result.summary.categories.seo.averageScore)} |`,
|
`| SEO | ${score(result.summary.categories.seo.averageScore)} |`,
|
||||||
|
`| *Overall* | ${score(result.summary.score)} |`,
|
||||||
'',
|
'',
|
||||||
'*Lighthouse scores for individual routes:*',
|
'*Lighthouse scores for individual routes:*',
|
||||||
'',
|
'',
|
||||||
'| Path | Performance | Accessibility | Best practices | SEO |',
|
'| 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)} |`).join('\n')}`,
|
`${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:*',
|
'*Lighthouse metrics:*',
|
||||||
'',
|
'',
|
||||||
|
|
12
.github/workflows/lint-deps-check.yaml
vendored
12
.github/workflows/lint-deps-check.yaml
vendored
|
@ -8,6 +8,10 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
checks: write
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-checks:
|
run-checks:
|
||||||
name: Run checks
|
name: Run checks
|
||||||
|
@ -15,18 +19,18 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out Git repository
|
- name: Check out Git repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3.5.3
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3.6.0
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 18
|
||||||
|
|
||||||
- name: Install Node.js dependencies
|
- name: Install Node.js dependencies
|
||||||
run: yarn install --frozen-lockfile
|
run: yarn install --frozen-lockfile
|
||||||
|
|
||||||
- name: Run linters
|
- name: Run linters
|
||||||
uses: wearerequired/lint-action@v2
|
uses: wearerequired/lint-action@v2.3.0
|
||||||
with:
|
with:
|
||||||
eslint: true
|
eslint: true
|
||||||
prettier: true
|
prettier: true
|
||||||
|
|
|
@ -11,3 +11,4 @@ node_modules
|
||||||
build
|
build
|
||||||
.contentlayer
|
.contentlayer
|
||||||
.github
|
.github
|
||||||
|
.unlighthouse
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
To install the project and its dependencies, follow these steps:
|
To install the project and its dependencies, follow these steps:
|
||||||
|
|
|
@ -1,83 +1,82 @@
|
||||||
|
|
||||||
/* Custom AOS distance */
|
/* Custom AOS distance */
|
||||||
@media screen {
|
@media screen {
|
||||||
html:not(.no-js) [data-aos=fade-up] {
|
html:not(.no-js) [data-aos="fade-up"] {
|
||||||
-webkit-transform: translate3d(0, 14px, 0);
|
-webkit-transform: translate3d(0, 14px, 0);
|
||||||
transform: translate3d(0, 14px, 0);
|
transform: translate3d(0, 14px, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not(.no-js) [data-aos=fade-down] {
|
html:not(.no-js) [data-aos="fade-down"] {
|
||||||
-webkit-transform: translate3d(0, -14px, 0);
|
-webkit-transform: translate3d(0, -14px, 0);
|
||||||
transform: translate3d(0, -14px, 0);
|
transform: translate3d(0, -14px, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not(.no-js) [data-aos=fade-right] {
|
html:not(.no-js) [data-aos="fade-right"] {
|
||||||
-webkit-transform: translate3d(-14px, 0, 0);
|
-webkit-transform: translate3d(-14px, 0, 0);
|
||||||
transform: translate3d(-14px, 0, 0);
|
transform: translate3d(-14px, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not(.no-js) [data-aos=fade-left] {
|
html:not(.no-js) [data-aos="fade-left"] {
|
||||||
-webkit-transform: translate3d(14px, 0, 0);
|
-webkit-transform: translate3d(14px, 0, 0);
|
||||||
transform: translate3d(14px, 0, 0);
|
transform: translate3d(14px, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not(.no-js) [data-aos=fade-up-right] {
|
html:not(.no-js) [data-aos="fade-up-right"] {
|
||||||
-webkit-transform: translate3d(-14px, 14px, 0);
|
-webkit-transform: translate3d(-14px, 14px, 0);
|
||||||
transform: translate3d(-14px, 14px, 0);
|
transform: translate3d(-14px, 14px, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not(.no-js) [data-aos=fade-up-left] {
|
html:not(.no-js) [data-aos="fade-up-left"] {
|
||||||
-webkit-transform: translate3d(14px, 14px, 0);
|
-webkit-transform: translate3d(14px, 14px, 0);
|
||||||
transform: translate3d(14px, 14px, 0);
|
transform: translate3d(14px, 14px, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not(.no-js) [data-aos=fade-down-right] {
|
html:not(.no-js) [data-aos="fade-down-right"] {
|
||||||
-webkit-transform: translate3d(-14px, -14px, 0);
|
-webkit-transform: translate3d(-14px, -14px, 0);
|
||||||
transform: translate3d(-14px, -14px, 0);
|
transform: translate3d(-14px, -14px, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not(.no-js) [data-aos=fade-down-left] {
|
html:not(.no-js) [data-aos="fade-down-left"] {
|
||||||
-webkit-transform: translate3d(14px, -14px, 0);
|
-webkit-transform: translate3d(14px, -14px, 0);
|
||||||
transform: translate3d(14px, -14px, 0);
|
transform: translate3d(14px, -14px, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not(.no-js) [data-aos=zoom-in-up] {
|
html:not(.no-js) [data-aos="zoom-in-up"] {
|
||||||
-webkit-transform: translate3d(0, 14px, 0) scale(.6);
|
-webkit-transform: translate3d(0, 14px, 0) scale(0.6);
|
||||||
transform: translate3d(0, 14px, 0) scale(.6);
|
transform: translate3d(0, 14px, 0) scale(0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not(.no-js) [data-aos=zoom-in-down] {
|
html:not(.no-js) [data-aos="zoom-in-down"] {
|
||||||
-webkit-transform: translate3d(0, -14px, 0) scale(.6);
|
-webkit-transform: translate3d(0, -14px, 0) scale(0.6);
|
||||||
transform: translate3d(0, -14px, 0) scale(.6);
|
transform: translate3d(0, -14px, 0) scale(0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not(.no-js) [data-aos=zoom-in-right] {
|
html:not(.no-js) [data-aos="zoom-in-right"] {
|
||||||
-webkit-transform: translate3d(-14px, 0, 0) scale(.6);
|
-webkit-transform: translate3d(-14px, 0, 0) scale(0.6);
|
||||||
transform: translate3d(-14px, 0, 0) scale(.6);
|
transform: translate3d(-14px, 0, 0) scale(0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not(.no-js) [data-aos=zoom-in-left] {
|
html:not(.no-js) [data-aos="zoom-in-left"] {
|
||||||
-webkit-transform: translate3d(14px, 0, 0) scale(.6);
|
-webkit-transform: translate3d(14px, 0, 0) scale(0.6);
|
||||||
transform: translate3d(14px, 0, 0) scale(.6);
|
transform: translate3d(14px, 0, 0) scale(0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
html:not(.no-js) [data-aos=zoom-out-up] {
|
html:not(.no-js) [data-aos="zoom-out-up"] {
|
||||||
-webkit-transform: translate3d(0, 14px, 0) scale(1.2);
|
-webkit-transform: translate3d(0, 14px, 0) scale(1.2);
|
||||||
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] {
|
html:not(.no-js) [data-aos="zoom-out-down"] {
|
||||||
-webkit-transform: translate3d(0, -14px, 0) scale(1.2);
|
-webkit-transform: translate3d(0, -14px, 0) scale(1.2);
|
||||||
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] {
|
html:not(.no-js) [data-aos="zoom-out-right"] {
|
||||||
-webkit-transform: translate3d(-14px, 0, 0) scale(1.2);
|
-webkit-transform: translate3d(-14px, 0, 0) scale(1.2);
|
||||||
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] {
|
html:not(.no-js) [data-aos="zoom-out-left"] {
|
||||||
-webkit-transform: translate3d(14px, 0, 0) scale(1.2);
|
-webkit-transform: translate3d(14px, 0, 0) scale(1.2);
|
||||||
transform: translate3d(14px, 0, 0) scale(1.2);
|
transform: translate3d(14px, 0, 0) scale(1.2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
@import 'tailwindcss/base';
|
@import "tailwindcss/base";
|
||||||
@import 'tailwindcss/components';
|
@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 */
|
/* Additional Tailwind directives: https://tailwindcss.com/docs/functions-and-directives/#responsive */
|
||||||
@layer utilities {
|
@layer utilities {
|
||||||
.rtl {
|
.rtl {
|
||||||
direction: rtl;
|
direction: rtl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,6 @@ const nextConfig = {
|
||||||
experimental: {
|
experimental: {
|
||||||
appDir: true,
|
appDir: true,
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
|
|
||||||
module.exports = nextConfig
|
module.exports = nextConfig;
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
"preview": "next build && next start",
|
"preview": "next build && next start",
|
||||||
"typecheck": "tsc --noEmit",
|
"typecheck": "tsc --noEmit",
|
||||||
"format:write": "prettier --write \"**/*.{ts,tsx,mdx}\" --cache",
|
"format:write": "prettier . --write --cache",
|
||||||
"format:check": "prettier --check \"**/*.{ts,tsx,mdx}\" --cache"
|
"format:check": "prettier . --check --cache"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@clerk/clerk-react": "^4.18.0",
|
"@clerk/clerk-react": "^4.18.0",
|
||||||
|
|
|
@ -4,7 +4,11 @@ const colors = require("tailwindcss/colors");
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
darkMode: ["class"],
|
darkMode: ["class"],
|
||||||
content: ["app/**/*.{ts,tsx}", "components/**/*.{ts,tsx}", "content/**/*.mdx"],
|
content: [
|
||||||
|
"app/**/*.{ts,tsx}",
|
||||||
|
"components/**/*.{ts,tsx}",
|
||||||
|
"content/**/*.mdx",
|
||||||
|
],
|
||||||
theme: {
|
theme: {
|
||||||
container: {
|
container: {
|
||||||
center: true,
|
center: true,
|
||||||
|
@ -23,8 +27,10 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
backgroundImage: {
|
backgroundImage: {
|
||||||
"gradient-conic": "conic-gradient(var(--conic-position), var(--tw-gradient-stops))",
|
"gradient-conic":
|
||||||
"gradient-radial-top": "radial-gradient(100% 60% at 100% 0%, var(--tw-gradient-stops))",
|
"conic-gradient(var(--conic-position), var(--tw-gradient-stops))",
|
||||||
|
"gradient-radial-top":
|
||||||
|
"radial-gradient(100% 60% at 100% 0%, var(--tw-gradient-stops))",
|
||||||
},
|
},
|
||||||
keyframes: {
|
keyframes: {
|
||||||
"accordion-down": {
|
"accordion-down": {
|
||||||
|
|
Loading…
Reference in a new issue