Skip to content

Commit

Permalink
Merge pull request #2 from clydedsouza/revert-1-nextjs
Browse files Browse the repository at this point in the history
Revert "Migrate to Next JS"
  • Loading branch information
clydedsouza authored Jul 29, 2024
2 parents 0159d16 + f69bcf3 commit 27e52be
Show file tree
Hide file tree
Showing 188 changed files with 19,495 additions and 10,387 deletions.
48 changes: 14 additions & 34 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ on:
- "api/**"
- "images/**"

workflow_dispatch:

permissions:
contents: read

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

jobs:
build_website:
name: Build website
Expand All @@ -34,46 +25,35 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v3
with:
node-version: 20.x
node-version: 18.x

- name: Restore cache
uses: actions/cache@v4
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
- name: Install NPM packages
run: npm ci

- name: Run unit tests
run: npm run test

- name: Run lint
run: npm run lint

- name: Build with Next.js
run: npx --no-install next build
- name: Run prettier
run: npm run pretty

- name: Run unit tests
run: npm run test

- name: Generate sitemap file
run: npm run sitemap
- name: Build website
run: npm run build

- name: Upload website files
uses: actions/upload-artifact@v3
with:
path: ./website/out
path: ./website/build

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
deploy_website:
name: Deploy website
runs-on: ubuntu-latest
needs: build_website
if: |
Expand Down
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions website/.env

This file was deleted.

5 changes: 5 additions & 0 deletions website/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore folders:

build
coverage
node_modules
47 changes: 47 additions & 0 deletions website/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
'plugin:react-hooks/recommended',
'plugin:jest/recommended',
'plugin:testing-library/react',
'plugin:react/jsx-runtime',
'plugin:@typescript-eslint/recommended',
],
parser: '@babel/eslint-parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
requireConfigFile: false,
},
plugins: [],
overrides: [
{
files: ['**/*.ts?(x)'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
},
],
root: true,
rules: {
'no-console': 'error',
'multiline-comment-style': ['error', 'starred-block'],
'no-inline-comments': 'error',
},
settings: {
react: {
version: 'detect',
},
},
}
3 changes: 0 additions & 3 deletions website/.eslintrc.json

This file was deleted.

21 changes: 4 additions & 17 deletions website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,20 @@
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem
.env.local
.env.development.local
.env.test.local
.env.production.local

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

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
7 changes: 7 additions & 0 deletions website/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ignore folders:
build
coverage
node_modules

# Ignore files:
*.svg
6 changes: 6 additions & 0 deletions website/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
12 changes: 12 additions & 0 deletions website/TestHelpers/testHelper.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export const emptyProject = {
title: '',
description: '',
image: '',
imageDescription: '',
category: '',
date: '',
id: '',
madeUsing: [],
website: 'https://test.com',
github: 'https://github.com',
}
33 changes: 0 additions & 33 deletions website/jest.config.ts

This file was deleted.

7 changes: 0 additions & 7 deletions website/next-sitemap.config.js

This file was deleted.

13 changes: 0 additions & 13 deletions website/next.config.js

This file was deleted.

Loading

0 comments on commit 27e52be

Please sign in to comment.