Skip to content

Commit

Permalink
add seo analyzer #41
Browse files Browse the repository at this point in the history
  • Loading branch information
ukorvl committed Jan 20, 2024
1 parent 8ec48cd commit a729e9f
Show file tree
Hide file tree
Showing 18 changed files with 3,287 additions and 80 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ NEXT_PUBLIC_CONTACT_PHONE="+374 431 085 88"

NEXT_PUBLIC_LOCATION_GOOGLE_MAPS_LINK="https://shorturl.at/gsuK5"
NEXT_PUBLIC_LOCATION_ADDRESS_TEXT=" 41, 4 Abovyan St, Yerevan 0009"

PUBLIC
25 changes: 22 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@ name: Build
on:
pull_request:
workflow_dispatch:
push:
branches:
- master
inputs:
branch:
description: 'Branch to build'
required: true
default: 'master'
workflow_call:
inputs:
public_path:
type: string
description: 'Inject public path'
required: false
default: ''

jobs:
build:
Expand All @@ -32,6 +41,7 @@ jobs:
envkey_NEXT_PUBLIC_FORMSPREE_ID: "${{ secrets.NEXT_PUBLIC_FORMSPREE_ID }}"
envkey_NEXT_PUBLIC_HOTJAR_ID: ${{ secrets.NEXT_PUBLIC_HOTJAR_ID }}
envkey_NEXT_PUBLIC_HOTJAR_SNIPPET_VERSION: ${{ secrets.NEXT_PUBLIC_HOTJAR_SNIPPET_VERSION }}
envkey_PUBLIC_PATH: ${{ github.event.inputs.public_path }}
directory: '.'
file_name: .env.local
fail_on_empty: false
Expand All @@ -44,8 +54,17 @@ jobs:
- name: Build
run: npm run build

- name: Check seo
run: npm run check-seo

- name: e2e
uses: cypress-io/github-action@v5
with:
start: npm run start
record: false

- name: Upload build results
uses: actions/upload-artifact@v2
with:
name: build
path: out
52 changes: 52 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy

on:
push:
branches:
- master

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
uses: ./build.yml
with:
branch: ${{ github.event.head_commit.message }}
inject_public_path: https://${{ github.repository_owner }}.github.io/${{ github.repository_name }}

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Nodejs
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Download build results
uses: actions/download-artifact@v2
with:
name: build
path: ./out
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
publish_branch: gh-pages
force_orphan: true
enable_jekyll: false
clean: true
commit_message: ${{ github.event.head_commit.message }}
commit_user_name: ${{ github.event.head_commit.author.name }}
commit_user_email: ${{ github.event.head_commit.author.email }}

2 changes: 2 additions & 0 deletions app/about/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ import Philosophy from '@/components/pages/About/Philosophy';
import CATLink from '@/components/shared/CATLink/CATLink';
import BlockWithImage from '@/components/pages/About/BlockWithImage';
import WhyJoinBlock from '@/components/pages/About/WhyJoinBlock/WhyJoinBlock';
import metadataBase from '../metadata';

export const metadata: Metadata = {
title: 'About',
openGraph: {
title: 'Salsaviva - About',
description: `Get ready to discover the Magic at Salsaviva. Read about our
welcoming and inspiring community of dancers`,
...metadataBase.openGraph,
},
};

Expand Down
2 changes: 2 additions & 0 deletions app/contact/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import AppearInViewport from '@/components/shared/AppearInViewport/AppearInViewp
import TransitionDuration from '@/lib/framerMotion/TransitionDuration';
import getTextSlideIntoViewVarinats from '@/lib/framerMotion/variants/getTextSlideIntoViewVarinats';
import FormWrapper from '@/components/pages/Contact/FormWrapper/FormWrapper';
import metadataBase from '../metadata';

export const metadata: Metadata = {
title: 'Contact',
openGraph: {
title: 'Salsaviva - Contact',
description: 'Connect and dance: Contacts for Your next breathtaking dancing adventure',
...metadataBase.openGraph,
},
};

Expand Down
2 changes: 2 additions & 0 deletions app/gallery/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import Gallery from '@/components/pages/Gallery/Gallery';
import AppearInViewport from '@/components/shared/AppearInViewport/AppearInViewport';
import SocialIcons from '@/components/shared/SocialIcons/SocialIcons';
import TransitionDuration from '@/lib/framerMotion/TransitionDuration';
import metadataBase from '../metadata';
import './styles.css';

export const metadata: Metadata = {
title: 'Gallery',
openGraph: {
title: 'Salsaviva - Gallery',
description: 'Explore the vibrant world of social dance',
...metadataBase.openGraph,
},
};

Expand Down
3 changes: 3 additions & 0 deletions app/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@ const metadata: Metadata = {
],
locale: 'en_US',
type: 'website',
siteName: 'Salsaviva',
url: origin,
},
twitter: {
card: 'summary_large_image',
title: 'Salsaviva',
description: 'Salsa, Bachata and Kizomba in Yerevan',
images: ['/og.jpg'],
site: '@salsaviva',
},
icons: [
{
Expand Down
2 changes: 2 additions & 0 deletions app/teachers/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import CATLink from '@/components/shared/CATLink/CATLink';
import AppearInViewport from '@/components/shared/AppearInViewport/AppearInViewport';
import TransitionDuration from '@/lib/framerMotion/TransitionDuration';
import getTextSlideIntoViewVarinats from '@/lib/framerMotion/variants/getTextSlideIntoViewVarinats';
import metadataBase from '../metadata';

const pageDescription = 'Meet your inspirational guides in the world of social dance';

Expand All @@ -13,6 +14,7 @@ export const metadata: Metadata = {
openGraph: {
title: 'Salsaviva - Teachers',
description: pageDescription,
...metadataBase.openGraph,
},
};

Expand Down
2 changes: 2 additions & 0 deletions lib/shared/useDisableBodyScroll.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import {useEffect} from 'react';

/**
Expand Down
2 changes: 2 additions & 0 deletions lib/shared/useDisableRightClick.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import {useEffect, useRef} from 'react';

/**
Expand Down
2 changes: 2 additions & 0 deletions lib/shared/useHover.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import type {MutableRefObject} from 'react';
import {useEffect, useRef, useState} from 'react';

Expand Down
2 changes: 2 additions & 0 deletions lib/shared/useNetworkSpeed.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import {useEffect, useState} from 'react';
import {isServer} from '@/utils/isServer';

Expand Down
2 changes: 2 additions & 0 deletions lib/shared/useWindowDimensions.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import {useEffect, useState} from 'react';
import debounce from 'lodash/debounce';
import {isServer} from '@/utils/isServer';
Expand Down
5 changes: 4 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import './app/env.mjs';

/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
output: 'export',
images: {
unoptimized: true,
},
};

const withAnalyzer = withBundleAnalyzer({
Expand Down
Loading

0 comments on commit a729e9f

Please sign in to comment.