Skip to content

Commit 04cf37f

Browse files
committed
chore: add GPRG V2
1 parent 888aff3 commit 04cf37f

File tree

131 files changed

+17088
-80347
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+17088
-80347
lines changed

.all-contributorsrc

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"files": [
3-
"README.md"
4-
],
2+
"files": ["README.md"],
53
"imageSize": 100,
64
"commit": false,
75
"contributors": [
@@ -10,82 +8,63 @@
108
"name": "Sarbik Betal",
119
"avatar_url": "https://avatars2.githubusercontent.com/u/41508422?v=4",
1210
"profile": "https://github.com/sarbikbetal",
13-
"contributions": [
14-
"code"
15-
]
11+
"contributions": ["code"]
1612
},
1713
{
1814
"login": "Hardik0307",
1915
"name": "Hardik Bagada",
2016
"avatar_url": "https://avatars3.githubusercontent.com/u/41434099?v=4",
2117
"profile": "https://github.com/Hardik0307",
22-
"contributions": [
23-
"code"
24-
]
18+
"contributions": ["code"]
2519
},
2620
{
2721
"login": "antonkomarev",
2822
"name": "Anton Komarev",
2923
"avatar_url": "https://avatars0.githubusercontent.com/u/1849174?v=4",
3024
"profile": "https://komarev.com",
31-
"contributions": [
32-
"plugin"
33-
]
25+
"contributions": ["plugin"]
3426
},
3527
{
3628
"login": "KKVANONYMOUS",
3729
"name": "Kunal Kumar Verma",
3830
"avatar_url": "https://avatars3.githubusercontent.com/u/58628586?v=4",
3931
"profile": "https://kkvanonymous.github.io/",
40-
"contributions": [
41-
"code"
42-
]
32+
"contributions": ["code"]
4333
},
4434
{
4535
"login": "jaideepghosh",
4636
"name": "Jaideep Ghosh",
4737
"avatar_url": "https://avatars2.githubusercontent.com/u/3909648?v=4",
4838
"profile": "http://jaideepghosh.blogspot.com",
49-
"contributions": [
50-
"code"
51-
]
52-
}
39+
"contributions": ["code"]
40+
},
5341
{
5442
"login": "YashKandalkar",
5543
"name": "yash",
5644
"avatar_url": "https://avatars0.githubusercontent.com/u/35102959?v=4",
5745
"profile": "http://yashkandalkar.github.io",
58-
"contributions": [
59-
"code"
60-
]
46+
"contributions": ["code"]
6147
},
6248
{
6349
"login": "abhijit-hota",
6450
"name": "Abhijit Hota",
6551
"avatar_url": "https://avatars0.githubusercontent.com/u/8116174?v=4",
6652
"profile": "https://github.com/abhijit-hota",
67-
"contributions": [
68-
"code",
69-
"test"
70-
]
53+
"contributions": ["code", "test"]
7154
},
7255
{
7356
"login": "Maddoxx88",
7457
"name": "Sunit Shirke",
7558
"avatar_url": "https://avatars1.githubusercontent.com/u/34238672?v=4",
7659
"profile": "https://maddoxx88.github.io/",
77-
"contributions": [
78-
"code"
79-
]
80-
}
60+
"contributions": ["code"]
61+
},
8162
{
8263
"login": "g-savitha",
8364
"name": "Savitha Gollamudi",
8465
"avatar_url": "https://avatars0.githubusercontent.com/u/31612459?v=4",
8566
"profile": "https://www.gsavitha.in",
86-
"contributions": [
87-
"code"
88-
]
67+
"contributions": ["code"]
8968
}
9069
],
9170
"contributorsPerLine": 7,

.github/workflows/deploy.yml

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
branches: [master, dev]
6+
pull_request:
7+
branches: [master, dev]
8+
9+
# Allow concurrent deployments for different environments
10+
concurrency:
11+
group: 'pages-${{ github.ref }}'
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '20'
26+
cache: 'npm'
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Run type check
32+
run: npm run type-check
33+
34+
- name: Run linting
35+
run: npm run lint
36+
37+
- name: Run tests
38+
run: npm run test
39+
40+
- name: Build application
41+
run: npm run build
42+
env:
43+
NEXT_PUBLIC_GA_ID: ${{ secrets.NEXT_PUBLIC_GA_ID }}
44+
NEXT_PUBLIC_REQUIRE_CONSENT: true
45+
NEXT_PUBLIC_ANONYMIZE_IP: true
46+
47+
- name: Upload Pages Artifact (Production)
48+
if: github.ref == 'refs/heads/master'
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: ./out
52+
53+
- name: Upload Preview Artifact
54+
if: github.ref != 'refs/heads/master'
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: preview-build-${{ github.run_number }}-${{ github.run_attempt }}
58+
path: ./out
59+
retention-days: 30
60+
61+
# Production deployment to main GitHub Pages
62+
deploy-production:
63+
needs: build
64+
runs-on: ubuntu-latest
65+
66+
# Only deploy to production from master branch
67+
if: github.ref == 'refs/heads/master'
68+
69+
permissions:
70+
pages: write
71+
id-token: write
72+
73+
environment:
74+
name: github-pages
75+
url: ${{ steps.deployment.outputs.page_url }}
76+
77+
steps:
78+
- name: Deploy to GitHub Pages
79+
id: deployment
80+
uses: actions/deploy-pages@v4
81+
82+
# Preview deployment for development branches
83+
deploy-preview:
84+
needs: build
85+
runs-on: ubuntu-latest
86+
87+
# Deploy preview for dev branches (not master, not PRs)
88+
if: github.ref != 'refs/heads/master' && github.event_name == 'push'
89+
90+
steps:
91+
- name: Download Preview Artifact
92+
uses: actions/download-artifact@v4
93+
with:
94+
name: preview-build-${{ github.run_number }}-${{ github.run_attempt }}
95+
path: ./preview-out
96+
97+
- name: Deploy to Surge.sh (Preview)
98+
run: |
99+
npm install -g surge
100+
# Sanitize branch name for URL (replace invalid characters with dashes)
101+
SANITIZED_BRANCH=$(echo "${{ github.ref_name }}" | sed 's/[^a-zA-Z0-9-]/-/g' | tr '[:upper:]' '[:lower:]')
102+
echo "Deploying preview for branch: ${{ github.ref_name }}"
103+
echo "Sanitized branch name: $SANITIZED_BRANCH"
104+
surge ./preview-out https://gprg-${SANITIZED_BRANCH}.surge.sh --token ${{ secrets.SURGE_TOKEN }}
105+
env:
106+
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
107+
108+
- name: Comment PR with Preview URL
109+
if: github.event_name == 'pull_request'
110+
uses: actions/github-script@v7
111+
with:
112+
script: |
113+
// Sanitize branch name for URL (replace invalid characters with dashes)
114+
const branchName = '${{ github.ref_name }}';
115+
const sanitizedBranch = branchName.replace(/[^a-zA-Z0-9-]/g, '-').toLowerCase();
116+
const previewUrl = `https://gprg-${sanitizedBranch}.surge.sh`;
117+
118+
github.rest.issues.createComment({
119+
issue_number: context.issue.number,
120+
owner: context.repo.owner,
121+
repo: context.repo.repo,
122+
body: `🚀 **Preview Deployment Ready!**\n\n📱 Preview URL: ${previewUrl}\n\n*This preview will be available for 30 days.*`
123+
});
124+
125+
- name: Update Status Check
126+
run: |
127+
# Sanitize branch name for URL (replace invalid characters with dashes)
128+
SANITIZED_BRANCH=$(echo "${{ github.ref_name }}" | sed 's/[^a-zA-Z0-9-]/-/g' | tr '[:upper:]' '[:lower:]')
129+
echo "Preview deployed successfully!"
130+
echo "Preview URL: https://gprg-${SANITIZED_BRANCH}.surge.sh"

.gitignore

Lines changed: 34 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,45 @@
1-
dist/
2-
# Logs
3-
logs
4-
*.log
5-
npm-debug.log*
6-
yarn-debug.log*
7-
yarn-error.log*
8-
9-
# Runtime data
10-
pids
11-
*.pid
12-
*.seed
13-
*.pid.lock
14-
15-
# Directory for instrumented libs generated by jscoverage/JSCover
16-
lib-cov
17-
18-
# Coverage directory used by tools like istanbul
19-
coverage
20-
21-
# nyc test coverage
22-
.nyc_output
23-
24-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
25-
.grunt
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
262

27-
# Bower dependency directory (https://bower.io/)
28-
bower_components
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
2912

30-
# node-waf configuration
31-
.lock-wscript
13+
# testing
14+
/coverage
3215

33-
# Compiled binary addons (http://nodejs.org/api/addons.html)
34-
build/Release
16+
# next.js
17+
/.next/
18+
/out/
3519

36-
# Dependency directories
37-
node_modules/
38-
jspm_packages/
20+
# production
21+
/build
3922

40-
# Typescript v1 declaration files
41-
typings/
42-
43-
# Optional npm cache directory
44-
.npm
45-
46-
# Optional eslint cache
47-
.eslintcache
48-
49-
# Optional REPL history
50-
.node_repl_history
23+
# misc
24+
.DS_Store
25+
*.pem
5126

52-
# Output of 'npm pack'
53-
*.tgz
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
5432

55-
# dotenv environment variable files
33+
# env files (can opt-in for committing if needed)
5634
.env*
5735

58-
# gatsby files
59-
.cache/
60-
public
36+
# vercel
37+
.vercel
6138

62-
# Mac files
63-
.DS_Store
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts
6442

65-
# Yarn
66-
yarn-error.log
67-
.pnp/
68-
.pnp.js
69-
# Yarn Integrity file
70-
.yarn-integrity
43+
# Claude
44+
.cursor/
45+
.claude/

.prettierrc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
"singleQuote": true,
33
"jsxSingleQuote": false,
44
"tabWidth": 2,
5-
"printWidth": 120,
6-
"trailingComma": "all",
5+
"printWidth": 100,
6+
"trailingComma": "es5",
77
"semi": true,
8-
"exclude": ["node_modules", "codepipeline"]
8+
"arrowParens": "always",
9+
"endOfLine": "lf",
10+
"plugins": ["prettier-plugin-tailwindcss"]
911
}

.travis.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)