revert: revert to yarn to deploy

This commit is contained in:
2023-09-14 21:08:33 -06:00
parent f5a9a88f84
commit f11ae1c4f3
11 changed files with 6639 additions and 221 deletions
+159 -4
View File
@@ -1,5 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# Created by https://www.toptal.com/developers/gitignore/api/node,yarn,nextjs
# Edit at https://www.toptal.com/developers/gitignore?templates=node,yarn,nextjs
### NextJS ###
# dependencies
/node_modules
/.pnp
@@ -26,12 +28,165 @@ yarn-error.log*
.pnpm-debug.log*
# local env files
.env
.env.*
!.env.example
.env*.local
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts
### Node ###
# Logs
logs
*.log
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
# Docusaurus cache and generated files
.docusaurus
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
### Node Patch ###
# Serverless Webpack directories
.webpack/
# Optional stylelint cache
# SvelteKit build / generate output
.svelte-kit
### yarn ###
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.yarn/*
!.yarn/releases
!.yarn/patches
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
# if you are NOT using Zero-installs, then:
# comment the following lines
# !.yarn/cache
# and uncomment the following lines
# .pnp.*
# End of https://www.toptal.com/developers/gitignore/api/node,yarn,nextjs
+1
View File
@@ -0,0 +1 @@
nodeLinker: node-modules
BIN
View File
Binary file not shown.
+3 -4
View File
@@ -2,9 +2,8 @@ module.exports = {
apps: [
{
name: process.env.APP_NAME || 'entgamers-website',
script: 'bun',
script: 'yarn',
args: 'run start',
interpreter: '~/.bun/bin/bun',
env: {
NODE_ENV: 'production',
PORT: process.env.PORT || 3000,
@@ -20,7 +19,7 @@ module.exports = {
ref: 'origin/production',
repo: 'https://github.com/SrJuggernaut/entgamers_pro',
path: process.env.DEPLOY_PATH,
'post-deploy': 'pm2 startOrRestart ecosystem.config.js',
'post-deploy': 'pm2 --silent startOrRestart ecosystem.config.js',
env: {
APP_NAME: process.env.APP_NAME,
PORT: process.env.PORT,
@@ -34,7 +33,7 @@ module.exports = {
ref: 'origin/preview',
repo: 'https://github.com/SrJuggernaut/entgamers_pro',
path: process.env.DEPLOY_PATH,
'post-deploy': 'pm2 startOrRestart ecosystem.config.js',
'post-deploy': 'pm2 --silent startOrRestart ecosystem.config.js',
env: {
APP_NAME: process.env.APP_NAME,
PORT: process.env.PORT,
+1 -1
View File
@@ -5,7 +5,7 @@
"scripts": {
"develop": "next dev",
"build": "next build",
"prestart": "bun install && next build",
"prestart": "yarn install && next build",
"start": "next start",
"lint": "next lint",
"prepare": "husky install"
+2 -9
View File
@@ -1,4 +1,4 @@
import { SocialSliderProps } from '@components/pages/home/socialNetworks/SocialSlider'
// import { SocialSliderProps } from '@components/pages/home/socialNetworks/SocialSlider'
import { Container, Paper } from '@mui/material'
import gsap, { Linear } from 'gsap'
import ScrollToPlugin from 'gsap/dist/ScrollToPlugin'
@@ -7,11 +7,7 @@ import { FC, useEffect, useRef } from 'react'
gsap.registerPlugin(ScrollTrigger, ScrollToPlugin)
export interface SocialNetworksProps {
socialNetworks: SocialSliderProps['slides']
}
const SocialNetworks: FC<SocialNetworksProps> = () => {
const SocialNetworks: FC = () => {
const layer01 = useRef<HTMLDivElement| null>(null)
const layer02 = useRef<HTMLDivElement| null>(null)
const layer03 = useRef<HTMLDivElement| null>(null)
@@ -86,9 +82,6 @@ const SocialNetworks: FC<SocialNetworksProps> = () => {
component={Container}
variant='glass'
>
{/* <SocialSlider
slides={socialNetworks}
/> */}
</Paper>
</div>
</div>
@@ -1,95 +0,0 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faFacebook, faInstagram, faTwitch, faTwitter, faYoutube } from '@fortawesome/free-brands-svg-icons'
import { Button, Typography } from '@mui/material'
import { Navigation, Pagination, A11y } from 'swiper'
import { Swiper, SwiperSlide } from 'swiper/react'
import 'swiper/css'
import 'swiper/css/navigation'
import 'swiper/css/pagination'
import { FC } from 'react'
import { Button as ButtonType } from '@interfaces'
export interface SlideProps {
socialNetwork: 'facebook' | 'twitter' | 'instagram' | 'youtube' | 'twitch'
description: string
links: ButtonType[]
}
const Slide:FC<SlideProps> = ({ description, socialNetwork, links }) => {
return (
<div
css={{
marginInline: '36px',
marginBlock: '16px',
padding: '16px'
}}
>
<Typography variant="body1" component="div" align="center" >
{{
facebook: <FontAwesomeIcon style={{ filter: 'drop-shadow(2px 2px 2px rgb(0 0 0 / 0.4)' }}icon={faFacebook} size="5x" fixedWidth />,
twitter: <FontAwesomeIcon style={{ filter: 'drop-shadow(2px 2px 2px rgb(0 0 0 / 0.4)' }}icon={faTwitter} size="5x" fixedWidth />,
instagram: <FontAwesomeIcon style={{ filter: 'drop-shadow(2px 2px 2px rgb(0 0 0 / 0.4)' }}icon={faInstagram} size="5x" fixedWidth />,
youtube: <FontAwesomeIcon style={{ filter: 'drop-shadow(2px 2px 2px rgb(0 0 0 / 0.4)' }}icon={faYoutube} size="5x" fixedWidth />,
twitch: <FontAwesomeIcon style={{ filter: 'drop-shadow(2px 2px 2px rgb(0 0 0 / 0.4)' }}icon={faTwitch} size="5x" fixedWidth />
}[socialNetwork]}
</Typography>
<Typography variant="body1" align="center" >
{description}
</Typography>
<div
css={{
display: 'flex',
justifyContent: 'space-around',
alignItems: 'center',
marginBlock: '1rem'
}}
>
{links.map(({ url, label, color, variant }) => (
<Button
key={url}
href={url}
target="_blank"
rel="noopener noreferrer"
variant={variant}
color={color}
>
{label}
</Button>
))}
</div>
</div>
)
}
export interface SocialSliderProps {
slides: SlideProps[]
}
const SocialSlider: FC<SocialSliderProps> = ({ slides }) => {
return (
<Swiper
modules={[Navigation, Pagination, A11y]}
spaceBetween={16}
slidesPerView={1}
navigation
pagination={{ clickable: true }}
scrollbar={{ draggable: true }}
>
{slides.map(({ socialNetwork, description, links }) => (
<SwiperSlide
key={socialNetwork}
>
<Slide
socialNetwork={socialNetwork}
description={description}
links={links}
/>
</SwiperSlide>
))}
</Swiper>
)
}
export default SocialSlider
-46
View File
@@ -1,46 +0,0 @@
import fetch from 'isomorphic-fetch'
import { NextApiRequest, NextApiResponse } from 'next'
import nextConnect from 'next-connect'
const handler = nextConnect<NextApiRequest, NextApiResponse>({
onError: (error, req, res) => {
res.status(501).json({ error: `Sorry something Happened! ${error.message}` })
},
onNoMatch: (req, res) => {
res.status(405).json({ error: `Method '${req.method}' Not Allowed` })
}
})
handler.post(
async (req, res) => {
const bodyToSend = JSON.stringify({
content: 'Nueva solicitud de unirse a equipo',
embeds: [
{
title: 'Solicitud de unirse a equipo',
color: 3782986,
fields: Object.entries(req.body).map(([key, value]) => ({
name: key,
value,
inline: false
})),
timestamp: new Date().toISOString()
}
]
})
const response = await fetch(process.env.DISCORD_JOIN_WEBHOOK_URL || '', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: bodyToSend
})
if (response.ok) {
res.status(200).json({ message: 'Form sent' })
} else {
res.status(500).json({ message: 'Something went wrong' })
}
}
)
export default handler
+3 -26
View File
@@ -1,11 +1,8 @@
import { GetStaticProps, GetStaticPropsResult, InferGetStaticPropsType } from 'next'
import { Paper, Tab, Tabs, Theme, Typography, useMediaQuery } from '@mui/material'
import { FC, useEffect, useState } from 'react'
import { Swiper as SwiperClass, Virtual } from 'swiper'
import { Swiper, SwiperSlide } from 'swiper/react'
import { GetStaticProps, GetStaticPropsResult, InferGetStaticPropsType } from 'next'
import { FC, useState } from 'react'
import Contained from '@components/layouts/Contained'
import PositionJoinTeam from '@components/pages/equipo/unirse/PositionJoinTeam'
import Seo from '@components/Seo'
import { EquipoUnirsePageProps } from '@interfaces'
@@ -98,16 +95,9 @@ export const getStaticProps: GetStaticProps<EquipoUnirsePageProps> = async (): P
const Unirse: FC<InferGetStaticPropsType<typeof getStaticProps>> = ({ title, seo, description, teamPositions }) => {
const [currentTab, setCurrentTab] = useState(0)
const [currenSwiper, setCurrenSwiper] = useState<SwiperClass | undefined>(undefined)
const isMediumOrBigger = useMediaQuery((theme: Theme) => theme.breakpoints.up('md'))
useEffect(() => {
if (currenSwiper) {
currenSwiper.slideToLoop(currentTab)
}
}, [currentTab])
return (
<Contained>
<Seo {...seo} />
@@ -136,20 +126,7 @@ const Unirse: FC<InferGetStaticPropsType<typeof getStaticProps>> = ({ title, seo
))}
</Tabs>
</Paper>
<Swiper
spaceBetween={50}
modules={[Virtual]}
allowTouchMove={false}
onSwiper={(swiper) => { setCurrenSwiper(swiper) }}
onSlideChange={(swiper) => { setCurrentTab(swiper.activeIndex) }}
virtual
>
{teamPositions.map((position, index) => (
<SwiperSlide key={index} >
<PositionJoinTeam {...position} />
</SwiperSlide>
))}
</Swiper>
</Contained>
)
}
-35
View File
@@ -5,7 +5,6 @@ import Footer from '@components/layouts/Footer'
import Header from '@components/layouts/Header'
import Clanes from '@components/pages/home/Clanes'
import Hero from '@components/pages/home/Hero'
import SocialNetworks from '@components/pages/home/SocialNetworks'
import Team from '@components/pages/home/Team'
const Home: NextPage = () => {
@@ -25,40 +24,6 @@ const Home: NextPage = () => {
title='Clanes'
description='Los clanes son espacios donde compartir nuestros gustos con otros usuarios, dándonos la oportunidad de organizar proyectos y eventos en los cuales formar parte.'
/>
<SocialNetworks
socialNetworks={[
{
socialNetwork: 'facebook',
description: 'Puedes seguirnos en Facebook para ver memes sobre videojuegos, información sobre los Clanes, la comunidad, eventos, etc. o formar parte del grupo para interactuar mas de cerca con otros integrantes de la comunidad',
links: [
{
label: 'Pagina de Facebook',
url: 'https://www.facebook.com/EntGamers/',
variant: 'contained',
color: 'primary'
},
{
label: 'Grupo de Facebook',
url: 'https://www.facebook.com/groups/EntGamers/',
variant: 'contained',
color: 'primary'
}
]
},
{
socialNetwork: 'twitter',
description: 'Puedes seguirnos en Twitter para enterarte de las noticias mas recientes sobre la comunidad, eventos y demás información.',
links: [
{
label: 'Twitter',
url: 'https://twitter.com/EntGamers',
variant: 'contained',
color: 'primary'
}
]
}
]}
/>
<Team
title='Equipo'
teamMembers={[
+6469
View File
File diff suppressed because it is too large Load Diff