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
0cb315c6
Commit
0cb315c6
authored
Jan 14, 2026
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rewrite the pipeline
parent
cf03d2c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
138 deletions
+11
-138
deploy.yml
.github/workflows/deploy.yml
+11
-138
No files found.
.github/workflows/deploy.yml
View file @
0cb315c6
...
...
@@ -19,18 +19,6 @@ jobs:
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
...
...
@@ -52,140 +40,25 @@ jobs:
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts
-
name
:
Deploy to server
-
name
:
Deploy
build
to server
run
:
|
rsync -avz --delete \
--exclude 'node_modules' \
rsync -az --delete \
--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
-
name
:
Install production dependencies
& restart app
run
:
|
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF'
ssh -o ServerAliveInterval=60 \
-o ServerAliveCountMax=3 \
-o StrictHostKeyChecking=no \
${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} << 'EOF'
set -e
export CI=true
cd /var/www/getFirekirin
npm ci --omit=dev --prefer-offline
pm2 reload ecosystem.config.js --update-env --env production || \
pm2 start ecosystem.config.js --env production
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
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