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:
- main
jobs:
build-and-deploy:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
- name: Setup Node (for lint only)
uses: actions/setup-node@v4
with:
node-version: 20
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
run: npm ci --prefer-offline --no-audit
- name: Lint
run: npm run lint
- name: Build project
run: npm run build
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 }}
# ❌ NO BUILD HERE
# Build happens on server
- name: Setup SSH
run: |
......@@ -52,97 +35,47 @@ jobs:
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
- name: Deploy build to server
- name: Deploy source to server
run: |
rsync -avz --delete \
--exclude '.git' \
--exclude '.env*' \
--exclude 'node_modules' \
--exclude 'conf' \
--exclude 'logs' \
--exclude 'ssl' \
--exclude 'tmp' \
--exclude 'private_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: |
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF'
# Load NVM
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# Go to app directory
cd /home/1522942.cloudwaysapps.com/swsjapwyjk
# Install dependencies (production only, no dev dependencies)
npm ci --prefer-offline --no-audit --production=false
# Reload or start PM2
pm2 reload ecosystem.config.js --update-env --env production || \
pm2 start ecosystem.config.js --env production
# Save PM2 process list
cd /home/1522942.cloudwaysapps.com/segekvheuz
# Install dependencies
npm ci --no-audit
# Build production app
NODE_ENV=production npm run build
# Restart PM2 safely
pm2 reload ecosystem.config.js --update-env || \
pm2 start ecosystem.config.js
pm2 save
# Show status
pm2 list
EOF
- name: Notify Slack on Success
if: success()
uses: slackapi/slack-github-action@v1.27.0
with:
payload: |
{
"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 }}>"
}
]
}
]
"text": "✅ getFirekirin Deployment Successful!"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
......@@ -154,44 +87,7 @@ jobs:
with:
payload: |
{
"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>"
}
}
]
"text": "❌ getFirekirin Deployment Failed!"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
......
module.exports = {
apps: [{
name: 'getFirekirin',
script: 'node_modules/next/dist/bin/next',
args: 'start',
cwd: '/home/1522942.cloudwaysapps.com/abcdxyz123',
instances: 1,
exec_mode: 'cluster',
autorestart: true,
watch: false,
max_memory_restart: '1G',
env_production: {
NODE_ENV: 'production',
PORT: 3000
},
error_file: '/home/1522942.cloudwaysapps.com/abcdxyz123/logs/pm2-error.log',
out_file: '/home/1522942.cloudwaysapps.com/abcdxyz123/logs/pm2-out.log',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true,
max_restarts: 10,
min_uptime: '10s'
}]
}
\ No newline at end of file
apps: [
{
name: "getFirekirin",
// Use Next binary directly
script: "node_modules/next/dist/bin/next",
args: "start -p 3000",
cwd: "/home/1522942.cloudwaysapps.com/segekvheuz",
// Process Management
instances: 1, // increase only if server has enough RAM
exec_mode: "cluster",
autorestart: true,
watch: false,
max_memory_restart: "1G",
max_restarts: 10,
min_uptime: "10s",
// Environment
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() {
<div className="input__field">
{/* <InputLabel htmlFor="photoid_number"></InputLabel> */}
<PasswordField
label='Photo ID'
label='Photo ID Number'
name="photoid_number"
placeholder="Enter photo ID"
placeholder="Enter photo ID Number"
value={values.photoid_number}
onChange={handleChange}
onBlur={handleBlur}
......
......@@ -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'),
address: Yup.string(),
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() {
......@@ -187,12 +187,12 @@ export default function VerifyKYCPage() {
{/* Photo ID */}
<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
fullWidth
id="photo_id"
name="photo_id"
placeholder="Enter photo ID"
placeholder="Enter photo ID Number"
value={formik.values.photo_id}
onChange={formik.handleChange}
onBlur={formik.handleBlur}
......
......@@ -8,6 +8,15 @@
"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