Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sweepstake
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arjun Jhukal
sweepstake
Commits
0c1fd02e
Commit
0c1fd02e
authored
Jan 14, 2026
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initialised the pipeline
parent
0ce35a25
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
211 additions
and
0 deletions
+211
-0
deploy.yml
.github/workflows/deploy.yml
+191
-0
ecosystem.config.js
ecosystem.config.js
+20
-0
No files found.
.github/workflows/deploy.yml
0 → 100644
View file @
0c1fd02e
name
:
getFirekirin Deployment Pipeline
on
:
push
:
branches
:
-
main
jobs
:
build-and-deploy
:
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@v4
-
name
:
Setup Node
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 }}
-
name
:
Setup SSH
run
:
|
mkdir -p ~/.ssh
echo "${{ secrets.SERVER_SSH_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
-
name
:
Deploy to server
run
:
|
rsync -avz --delete \
--exclude 'node_modules' \
--exclude '.git' \
--exclude '.env*' \
.next/ \
${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }}:/var/www/getFirekirin/.next/
rsync -avz \
--exclude 'node_modules' \
--exclude '.git' \
--exclude '.env*' \
--exclude '.next' \
./ \
${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }}:/var/www/getFirekirin/
-
name
:
Install production dependencies on server
run
:
|
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF'
cd /var/www/getFirekirin
npm ci --omit=dev --prefer-offline
EOF
-
name
:
Restart Next.js application
run
:
|
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF'
cd /var/www/getFirekirin
pm2 reload ecosystem.config.js --env production || pm2 start ecosystem.config.js --env production
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 }}>"
}
]
}
]
}
env
:
SLACK_WEBHOOK_URL
:
${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE
:
INCOMING_WEBHOOK
-
name
:
Notify Slack on Failure
if
:
failure()
uses
:
slackapi/slack-github-action@v1.27.0
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>"
}
}
]
}
env
:
SLACK_WEBHOOK_URL
:
${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE
:
INCOMING_WEBHOOK
ecosystem.config.js
0 → 100644
View file @
0c1fd02e
module
.
exports
=
{
apps
:
[{
name
:
'getFirekirin'
,
script
:
'node_modules/next/dist/bin/next'
,
args
:
'start -p 3000'
,
cwd
:
'/var/www/getFirekirin'
,
instances
:
1
,
autorestart
:
true
,
watch
:
false
,
max_memory_restart
:
'1G'
,
env_production
:
{
NODE_ENV
:
'production'
,
PORT
:
3000
},
error_file
:
'/var/www/getFirekirin/logs/pm2-error.log'
,
out_file
:
'/var/www/getFirekirin/logs/pm2-out.log'
,
log_date_format
:
'YYYY-MM-DD HH:mm:ss Z'
}]
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment