Skip to content

Commit

Permalink
Merge pull request #3 from coldsurfers/feature/migrate-coldsurf-io
Browse files Browse the repository at this point in the history
coldsurf website migration
  • Loading branch information
yungblud authored Jan 14, 2024
2 parents f54d5ff + 40147c2 commit 4b74875
Show file tree
Hide file tree
Showing 16 changed files with 3,025 additions and 30 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy-coldsurf-website-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: deploy coldsurf website preview website

on:
pull_request:
paths:
- 'packages/coldsurf-website/**'

env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_COLDSURF_WEBSITE_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: "yarn"
- run: npm config set @coldsurfers:registry https://npm.pkg.github.com/
- run: npm config set '//npm.pkg.github.com/:_authToken' ${{ secrets.GITHUB_TOKEN }}
- run: yarn install --immutable
- run: yarn build
working-directory: ./packages/coldsurf-website
- run: npx vercel pull --yes --token ${{ secrets.VERCEL_TOKEN }}
working-directory: ./packages/coldsurf-website
- run: npx vercel build
working-directory: ./packages/coldsurf-website
- run: npx vercel deploy --prebuilt --token ${{ secrets.VERCEL_TOKEN }}
working-directory: ./packages/coldsurf-website
34 changes: 34 additions & 0 deletions .github/workflows/deploy-coldsurf-website-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: deploy coldsurf website production website

on:
push:
branches:
- main
paths:
- 'packages/coldsurf-website/**'
workflow_dispatch:

env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_COLDSURF_WEBSITE_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: "yarn"
- run: npm config set @coldsurfers:registry https://npm.pkg.github.com/
- run: npm config set '//npm.pkg.github.com/:_authToken' ${{ secrets.GITHUB_TOKEN }}
- run: yarn install --immutable
- run: yarn build
working-directory: ./packages/coldsurf-website
- run: npx vercel pull --yes --token ${{ secrets.VERCEL_TOKEN }}
working-directory: ./packages/coldsurf-website
- run: npx vercel build --prod
working-directory: ./packages/coldsurf-website
- run: npx vercel deploy --prod --prebuilt --token ${{ secrets.VERCEL_TOKEN }}
working-directory: ./packages/coldsurf-website
10 changes: 10 additions & 0 deletions packages/coldsurf-website/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": [
"next/core-web-vitals",
"prettier"
],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error"
}
}
38 changes: 38 additions & 0 deletions packages/coldsurf-website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

# typescript
*.tsbuildinfo
6 changes: 6 additions & 0 deletions packages/coldsurf-website/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": false,
"singleQuote": true
}
34 changes: 34 additions & 0 deletions packages/coldsurf-website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
5 changes: 5 additions & 0 deletions packages/coldsurf-website/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
6 changes: 6 additions & 0 deletions packages/coldsurf-website/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
}

module.exports = nextConfig
32 changes: 32 additions & 0 deletions packages/coldsurf-website/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "coldsurf.io",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@emotion/css": "^11.7.1",
"@emotion/react": "^11.8.2",
"@emotion/styled": "^11.8.1",
"@react-spring/parallax": "^9.4.5",
"emotion-reset": "^3.0.1",
"next": "12.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-spring": "^9.4.5"
},
"devDependencies": {
"@types/node": "17.0.23",
"@types/react": "17.0.43",
"eslint": "8.11.0",
"eslint-config-next": "12.1.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "2.6.1",
"typescript": "4.6.3"
}
}
Binary file added packages/coldsurf-website/public/favicon.ico
Binary file not shown.
4 changes: 4 additions & 0 deletions packages/coldsurf-website/public/vercel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions packages/coldsurf-website/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import type { AppProps } from 'next/app'
import emotionReset from 'emotion-reset'
import { Global, css } from '@emotion/react'

function MyApp({ Component, pageProps }: AppProps) {
return (
<>
<Component {...pageProps} />
<Global
styles={css`
@import url('//fonts.googleapis.com/css2?family=Inconsolata:wght@200;300;400;500;600;700;800;900&display=swap');
${emotionReset}
body {
font-family: 'Inconsolata', monospace;
}
p {
font-size: 1.5rem;
font-weight: bold;
}
`}
/>
</>
)
}

export default MyApp
41 changes: 41 additions & 0 deletions packages/coldsurf-website/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import type { NextPage } from 'next'
import { Parallax, ParallaxLayer } from '@react-spring/parallax'

const Home: NextPage = () => {
return (
<Parallax pages={2} style={{ top: '0', left: '0' }}>
<ParallaxLayer
offset={0}
speed={2.5}
style={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}
>
<p>Welcome to ColdSurfers</p>
</ParallaxLayer>

<ParallaxLayer
offset={1}
speed={2}
style={{ backgroundColor: '#ff6d6d' }}
/>

<ParallaxLayer
offset={1}
speed={0.5}
style={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
color: 'white',
}}
>
<p>Something cool is coming</p>
</ParallaxLayer>
</Parallax>
)
}

export default Home
20 changes: 20 additions & 0 deletions packages/coldsurf-website/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
Loading

0 comments on commit 4b74875

Please sign in to comment.