Commit f3c836db by Arjun Jhukal

udpate the new lable for photo id number and also updated the apple file

parent a8626cc3
...@@ -6,44 +6,27 @@ on: ...@@ -6,44 +6,27 @@ on:
- main - main
jobs: jobs:
build-and-deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Node - name: Setup Node (for lint only)
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 20
cache: "npm" cache: "npm"
- name: Cache node modules
uses: actions/cache@v4
with:
path: |
~/.npm
node_modules
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
${{ runner.os }}-nextjs-
- name: Install dependencies - name: Install dependencies
run: npm ci --prefer-offline --no-audit run: npm ci --prefer-offline --no-audit
- name: Lint - name: Lint
run: npm run lint run: npm run lint
- name: Build project # ❌ NO BUILD HERE
run: npm run build # Build happens on server
env:
NODE_ENV: production
NEXT_PUBLIC_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
NEXT_PUBLIC_FRONTEND_URL: ${{ secrets.NEXT_PUBLIC_FRONTEND_URL }}
NEXT_PUBLIC_GTM_ID: ${{ secrets.NEXT_PUBLIC_GTM_ID }}
- name: Setup SSH - name: Setup SSH
run: | run: |
...@@ -52,97 +35,47 @@ jobs: ...@@ -52,97 +35,47 @@ jobs:
chmod 600 ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts ssh-keyscan -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
- name: Deploy build to server - name: Deploy source to server
run: | run: |
rsync -avz --delete \ rsync -avz --delete \
--exclude '.git' \ --exclude '.git' \
--exclude '.env*' \ --exclude '.env*' \
--exclude 'node_modules' \ --exclude 'node_modules' \
--exclude 'conf' \
--exclude 'logs' \ --exclude 'logs' \
--exclude 'ssl' \
--exclude 'tmp' \
--exclude 'private_html' \ --exclude 'private_html' \
--exclude 'public_html' \ --exclude 'public_html' \
./ \ ./ \
${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }}:/home/1522942.cloudwaysapps.com/swsjapwyjk/ ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }}:/home/1522942.cloudwaysapps.com/segekvheuz/
- name: Restart application - name: Build & Restart on Server
run: | run: |
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF' ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF'
# Load NVM
export NVM_DIR="$HOME/.nvm" export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# Go to app directory cd /home/1522942.cloudwaysapps.com/segekvheuz
cd /home/1522942.cloudwaysapps.com/swsjapwyjk
# Install dependencies
# Install dependencies (production only, no dev dependencies) npm ci --no-audit
npm ci --prefer-offline --no-audit --production=false
# Build production app
# Reload or start PM2 NODE_ENV=production npm run build
pm2 reload ecosystem.config.js --update-env --env production || \
pm2 start ecosystem.config.js --env production # Restart PM2 safely
pm2 reload ecosystem.config.js --update-env || \
# Save PM2 process list pm2 start ecosystem.config.js
pm2 save pm2 save
# Show status
pm2 list pm2 list
EOF EOF
- name: Notify Slack on Success - name: Notify Slack on Success
if: success() if: success()
uses: slackapi/slack-github-action@v1.27.0 uses: slackapi/slack-github-action@v1.27.0
with: with:
payload: | payload: |
{ {
"text": "✅ getFirekirin Deployment Successful!", "text": "✅ getFirekirin Deployment Successful!"
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "✅ getFirekirin Deployment Successful"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Repository:*\n${{ github.repository }}"
},
{
"type": "mrkdwn",
"text": "*Branch:*\n${{ github.ref_name }}"
},
{
"type": "mrkdwn",
"text": "*Commit:*\n<${{ github.event.head_commit.url }}|${{ github.sha }}>"
},
{
"type": "mrkdwn",
"text": "*Author:*\n${{ github.actor }}"
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Message:* ${{ github.event.head_commit.message }}"
}
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Deployed to production at <!date^${{ github.event.head_commit.timestamp }}^{date_num} {time_secs}|${{ github.event.head_commit.timestamp }}>"
}
]
}
]
} }
env: env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
...@@ -154,44 +87,7 @@ jobs: ...@@ -154,44 +87,7 @@ jobs:
with: with:
payload: | payload: |
{ {
"text": "❌ getFirekirin Deployment Failed!", "text": "❌ getFirekirin Deployment Failed!"
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "❌ getFirekirin Deployment Failed"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Repository:*\n${{ github.repository }}"
},
{
"type": "mrkdwn",
"text": "*Branch:*\n${{ github.ref_name }}"
},
{
"type": "mrkdwn",
"text": "*Commit:*\n<${{ github.event.head_commit.url }}|${{ github.sha }}>"
},
{
"type": "mrkdwn",
"text": "*Author:*\n${{ github.actor }}"
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Action:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Workflow Run>"
}
}
]
} }
env: env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
......
module.exports = { module.exports = {
apps: [{ apps: [
name: 'getFirekirin', {
script: 'node_modules/next/dist/bin/next', name: "getFirekirin",
args: 'start',
cwd: '/home/1522942.cloudwaysapps.com/abcdxyz123', // Use Next binary directly
instances: 1, script: "node_modules/next/dist/bin/next",
exec_mode: 'cluster', args: "start -p 3000",
autorestart: true,
watch: false, cwd: "/home/1522942.cloudwaysapps.com/segekvheuz",
max_memory_restart: '1G',
env_production: { // Process Management
NODE_ENV: 'production', instances: 1, // increase only if server has enough RAM
PORT: 3000 exec_mode: "cluster",
},
error_file: '/home/1522942.cloudwaysapps.com/abcdxyz123/logs/pm2-error.log', autorestart: true,
out_file: '/home/1522942.cloudwaysapps.com/abcdxyz123/logs/pm2-out.log', watch: false,
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true, max_memory_restart: "1G",
max_restarts: 10, max_restarts: 10,
min_uptime: '10s' min_uptime: "10s",
}]
} // Environment
\ No newline at end of file env: {
NODE_ENV: "production",
PORT: 3000
},
// Logging
error_file: "/home/1522942.cloudwaysapps.com/segekvheuz/logs/pm2-error.log",
out_file: "/home/1522942.cloudwaysapps.com/segekvheuz/logs/pm2-out.log",
log_date_format: "YYYY-MM-DD HH:mm:ss Z",
merge_logs: true
}
]
};
...@@ -283,9 +283,9 @@ export default function RegisterPage() { ...@@ -283,9 +283,9 @@ export default function RegisterPage() {
<div className="input__field"> <div className="input__field">
{/* <InputLabel htmlFor="photoid_number"></InputLabel> */} {/* <InputLabel htmlFor="photoid_number"></InputLabel> */}
<PasswordField <PasswordField
label='Photo ID' label='Photo ID Number'
name="photoid_number" name="photoid_number"
placeholder="Enter photo ID" placeholder="Enter photo ID Number"
value={values.photoid_number} value={values.photoid_number}
onChange={handleChange} onChange={handleChange}
onBlur={handleBlur} onBlur={handleBlur}
......
...@@ -57,7 +57,7 @@ const validationSchema = Yup.object({ ...@@ -57,7 +57,7 @@ const validationSchema = Yup.object({
dob: Yup.date().max(new Date(), 'Date of birth cannot be in the future').required('DOB is required'), dob: Yup.date().max(new Date(), 'Date of birth cannot be in the future').required('DOB is required'),
address: Yup.string(), address: Yup.string(),
user_id: Yup.string().required('User ID is required'), user_id: Yup.string().required('User ID is required'),
photo_id: Yup.string().required('Photo ID is required'), photo_id: Yup.string().required('Photo ID Number is required'),
}); });
export default function VerifyKYCPage() { export default function VerifyKYCPage() {
...@@ -187,12 +187,12 @@ export default function VerifyKYCPage() { ...@@ -187,12 +187,12 @@ export default function VerifyKYCPage() {
{/* Photo ID */} {/* Photo ID */}
<div className="input__field"> <div className="input__field">
<InputLabel htmlFor="photo_id">Photo ID<span className="text-red-500">*</span></InputLabel> <InputLabel htmlFor="photo_id">Photo ID Number<span className="text-red-500">*</span></InputLabel>
<OutlinedInput <OutlinedInput
fullWidth fullWidth
id="photo_id" id="photo_id"
name="photo_id" name="photo_id"
placeholder="Enter photo ID" placeholder="Enter photo ID Number"
value={formik.values.photo_id} value={formik.values.photo_id}
onChange={formik.handleChange} onChange={formik.handleChange}
onBlur={formik.handleBlur} onBlur={formik.handleBlur}
......
...@@ -8,6 +8,15 @@ ...@@ -8,6 +8,15 @@
"value": "text/plain" "value": "text/plain"
} }
] ]
},
{
"source": "/apple-developer-merchantid-domain-association",
"headers": [
{
"key": "Content-Type",
"value": "text/plain"
}
]
} }
] ]
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment