Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
dc1071b
Revert TOP-5530 From Prod.
jagadishchaudhari-tangoe Jun 23, 2025
11b1f69
Merge pull request #972 from mobi/Revert-TOP-5530-Style-Sheet-in-Prod…
jagadishchaudhari-tangoe Jun 24, 2025
7910560
Releasing 1.18.2
jagadishchaudhari-tangoe Jun 24, 2025
c41c416
Merge pull request #973 from mobi/release_1.18.2
jagadishchaudhari-tangoe Jun 25, 2025
539d2c8
TOP-5530 Style Changes Align to Bootstrap.
jagadishchaudhari-tangoe Jun 25, 2025
f7794c4
Merge pull request #975 from mobi/TOP-5530-Style-Changes-Align-to-Boo…
jagadishchaudhari-tangoe Jun 27, 2025
cf52eaf
Typeahead Component TOP-5549
jagadishchaudhari-tangoe Jul 1, 2025
6a0b45b
removed mixin function.
jagadishchaudhari-tangoe Jul 2, 2025
dad8e81
Test case bg color updated.
jagadishchaudhari-tangoe Jul 3, 2025
c156c5d
Typeahead Component TOP-5549 (#976)
jagadishchaudhari-tangoe Jul 3, 2025
5fd5b8d
SCSS changes for TOP-5551.
jagadishchaudhari-tangoe Jul 8, 2025
2095c94
Merge pull request #977 from mobi/TOP-5530-Style-Changes-Align-to-Boo…
jagadishchaudhari-tangoe Jul 10, 2025
c5b72ea
TOP-5553 and points from feedback doc.
jagadishchaudhari-tangoe Jul 10, 2025
26684f1
Merge pull request #978 from mobi/TOP-5530-Style-Changes-Align-to-Boo…
jagadishchaudhari-tangoe Jul 10, 2025
ffec199
SCSS Changes for TOP-5554 & TOP-5556
jagadishchaudhari-tangoe Jul 14, 2025
e7c026d
Merge pull request #979 from mobi/TOP-5530-Style-Changes-Align-to-Boo…
jagadishchaudhari-tangoe Jul 15, 2025
f0e1bd6
TOP-5558, TOP-5559, TOP-5560
jagadishchaudhari-tangoe Jul 16, 2025
c62b279
Merge pull request #980 from mobi/TOP-5530-Style-Changes-Align-to-Boo…
jagadishchaudhari-tangoe Jul 16, 2025
4462d6d
TOP-5561& TOP-5563 SCSS changes.
jagadishchaudhari-tangoe Jul 21, 2025
5cb0482
Merge pull request #981 from mobi/TOP-5530-Style-Changes-Align-to-Boo…
jagadishchaudhari-tangoe Jul 21, 2025
126f7a3
TOP-5555 & TOP-5645 SCSS changes.
jagadishchaudhari-tangoe Jul 28, 2025
44b078d
Merge pull request #982 from mobi/TOP-5530-Style-Changes-Align-to-Boo…
jagadishchaudhari-tangoe Jul 29, 2025
46ec423
TOP-5531 & TOP-5542 existing and new issues fixes.
jagadishchaudhari-tangoe Jul 29, 2025
3900fed
removed hello h1
jagadishchaudhari-tangoe Jul 29, 2025
f27bb66
Merge pull request #983 from mobi/TOP-5530-Style-Changes-Align-to-Boo…
jagadishchaudhari-tangoe Jul 29, 2025
e8dd133
TOP-5647 SCSS changes.
jagadishchaudhari-tangoe Jul 30, 2025
d70e641
active and hover updated.
jagadishchaudhari-tangoe Jul 30, 2025
028408c
added new line.
jagadishchaudhari-tangoe Jul 30, 2025
bda9190
Merge pull request #984 from mobi/TOP-5530-Style-Changes-Align-to-Boo…
jagadishchaudhari-tangoe Jul 31, 2025
4cc892a
TOP-5560 color names changes.
jagadishchaudhari-tangoe Aug 6, 2025
b5252b6
Merge pull request #985 from mobi/TOP-5530-Style-Changes-Align-to-Boo…
jagadishchaudhari-tangoe Aug 6, 2025
d6b2231
SCSS changes in issues discussion.
jagadishchaudhari-tangoe Aug 7, 2025
87f6f11
SCSS changes in issues discussion.
jagadishchaudhari-tangoe Aug 7, 2025
5518075
SCSS Changes in discussion.
jagadishchaudhari-tangoe Aug 12, 2025
a340a77
Merge pull request #987 from mobi/TOP-5530-Style-Changes-Align-to-Boo…
jagadishchaudhari-tangoe Aug 12, 2025
2f1aa50
changes in discussion for issues.
jagadishchaudhari-tangoe Aug 15, 2025
712bd3a
SCSS cahnges for Tab component.
jagadishchaudhari-tangoe Aug 21, 2025
a6ae111
border properties changed.
jagadishchaudhari-tangoe Aug 21, 2025
c7b052b
Merge pull request #988 from mobi/TOP-5530-Style-Changes-Align-to-Boo…
jagadishchaudhari-tangoe Aug 21, 2025
e15b214
Tab changes.
jagadishchaudhari-tangoe Aug 28, 2025
fb4c090
removed commented code.
jagadishchaudhari-tangoe Aug 29, 2025
633373a
Merge pull request #989 from mobi/TOP-5530-Style-Changes-Align-to-Boo…
jagadishchaudhari-tangoe Sep 1, 2025
0fae4e6
Shai-hulud-script run and fixed issues.
jagadishchaudhari-tangoe Jan 14, 2026
a01e9a6
build issue resolved.
jagadishchaudhari-tangoe Jan 28, 2026
c568481
Merge pull request #990 from mobi/security/npm-shai-hulud-script-run-…
jagadishchaudhari-tangoe Jan 28, 2026
45dc90f
Revert "Shai-hulud-script run and fixed issues."
jagadishchaudhari-tangoe Jan 30, 2026
7516bff
Merge pull request #991 from mobi/revert-990-security/npm-shai-hulud-…
jagadishchaudhari-tangoe Jan 30, 2026
3b9524f
added code deploy workflow
pavanrajutangoe Mar 12, 2026
9a1726d
updated the runner to execute jobs
pavanrajutangoe Mar 13, 2026
528bfe7
replaced rsync with tar as rsync not available on runner
pavanrajutangoe Mar 13, 2026
e539ea8
updated info to show deployment summary
pavanrajutangoe Mar 13, 2026
192db23
add bot comments everytime when a changed pushed to PR
pavanrajutangoe Mar 13, 2026
e0c8823
redeployment for the changes of NPM security script run
jagadishchaudhari-tangoe Mar 13, 2026
4321bfb
updated actions version and created generic node_modules cache
pavanrajutangoe Mar 14, 2026
d7bd731
removed cleanup step to cache node modules
pavanrajutangoe Mar 14, 2026
4895970
Merge pull request #992 from mobi/PCP-1186-code-deploy
pavanrajutangoe Mar 14, 2026
13e8760
fixed issue to clean pr deployment when closed
pavanrajutangoe Mar 14, 2026
0371704
Merge pull request #994 from mobi/PCP-1186-code-deploy-v2
pavanrajutangoe Mar 14, 2026
ef7d923
updated runner for cleanup preview
pavanrajutangoe Mar 14, 2026
bbbf3b6
Merge pull request #995 from mobi/PCP-1186-code-deploy-v3
pavanrajutangoe Mar 14, 2026
98966ce
skipping workspace clean when merging changes to main
pavanrajutangoe Mar 15, 2026
0700cd0
Merge pull request #996 from mobi/PCP-1186-code-deploy-v4
pavanrajutangoe Mar 15, 2026
3ece086
new version 1.18.3 release
pavanrajutangoe Mar 15, 2026
f9cce56
Merge pull request #993 from mobi/Shai-hulud-script-run-and-fixed-iss…
jagadishchaudhari-tangoe Mar 16, 2026
baefb0b
Merge remote-tracking branch 'origin/main' into dev.
jagadishchaudhari-tangoe Mar 17, 2026
06418a0
Merge branch 'dev' of https://github.com/mobi/goponents into dev
jagadishchaudhari-tangoe Mar 17, 2026
cf4a4d2
Merge pull request #998 from mobi/fix/pr-997-conflicts
jagadishchaudhari-tangoe Mar 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 192 additions & 0 deletions .github/workflows/code-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
name: Code Deploy

on:
push:
branches:
- main
- dev
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, closed]
branches-ignore:
- main

concurrency:
group: deploy-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.event_name == 'workflow_dispatch' && 'custom' || github.ref_name }}
cancel-in-progress: true

env:
DEPLOY_SERVER: ${{ vars.DEPLOY_SERVER_HOST }}
DEPLOY_USER: ${{ secrets.DEPLOY_SERVER_USER }}

jobs:
deploy:
name: Deploy Branch/PR Preview
runs-on: gomobilesharedstagedeploy
if: github.event_name != 'pull_request' || github.event.action != 'closed'
steps:
- name: Print current date
run: date +"%d/%m/%Y %H:%M:%S"

- name: Fix Storage
run: |
cd $(dirname $(dirname $GITHUB_WORKSPACE))
rm -rf goponents
mkdir -p goponents/goponents
cd goponents

- name: Set deployment variables
id: vars
run: |
SERVER="${{ env.DEPLOY_SERVER }}"
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "deploy_path=/var/www/goponents/custom" >> $GITHUB_OUTPUT
echo "base_href=/custom/" >> $GITHUB_OUTPUT
echo "deploy_url=https://${SERVER}/custom/" >> $GITHUB_OUTPUT
echo "deploy_label=custom (workflow_dispatch)" >> $GITHUB_OUTPUT
elif [ "${{ github.ref_name }}" = "main" ]; then
echo "deploy_path=/var/www/goponents/main" >> $GITHUB_OUTPUT
echo "base_href=/" >> $GITHUB_OUTPUT
echo "deploy_url=https://${SERVER}/" >> $GITHUB_OUTPUT
echo "deploy_label=main" >> $GITHUB_OUTPUT
elif [ "${{ github.ref_name }}" = "dev" ]; then
echo "deploy_path=/var/www/goponents/dev" >> $GITHUB_OUTPUT
echo "base_href=/dev/" >> $GITHUB_OUTPUT
echo "deploy_url=https://${SERVER}/dev/" >> $GITHUB_OUTPUT
echo "deploy_label=dev" >> $GITHUB_OUTPUT
elif [ "${{ github.event_name }}" = "pull_request" ]; then
PR_NUMBER=${{ github.event.pull_request.number }}
echo "deploy_path=/var/www/goponents/pr/${PR_NUMBER}" >> $GITHUB_OUTPUT
echo "base_href=/pr/${PR_NUMBER}/" >> $GITHUB_OUTPUT
echo "deploy_url=https://${SERVER}/pr/${PR_NUMBER}/" >> $GITHUB_OUTPUT
echo "deploy_label=PR #${PR_NUMBER}" >> $GITHUB_OUTPUT
fi

- name: Checkout code
uses: actions/checkout@v6

- name: Cache Node Modules
id: cache-node-modules
uses: actions/cache@v5
with:
path: ./node_modules
key: library-npm-${{ hashFiles('package-lock.json') }}

- name: Read .nvmrc
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV

- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NVMRC }}

- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci

- name: Build Style Guide
run: |
npm run style_guide_publish -- --base-href=${{ steps.vars.outputs.base_href }}
env:
CI: true

- name: Setup SSH Key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_USER_SSH_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
ssh-keyscan -H ${{ env.DEPLOY_SERVER }} >> ~/.ssh/known_hosts

- name: Deploy to Server
run: |
DEPLOY_PATH="${{ steps.vars.outputs.deploy_path }}"
SERVER="${{ env.DEPLOY_USER }}@${{ env.DEPLOY_SERVER }}"
SSH_CMD="ssh -i ~/.ssh/deploy_key"
TEMP_PATH="${DEPLOY_PATH}_new"

# Create temp directory for new files
$SSH_CMD $SERVER "rm -rf ${TEMP_PATH} && mkdir -p ${TEMP_PATH}"

# Transfer built files to temp directory
tar -czf - -C dist/go-style-guide . | $SSH_CMD $SERVER "tar -xzf - -C ${TEMP_PATH}"

# Atomic swap: remove old, rename new
$SSH_CMD $SERVER "rm -rf ${DEPLOY_PATH} && mv ${TEMP_PATH} ${DEPLOY_PATH}"

# Set proper permissions
$SSH_CMD $SERVER "chmod -R 755 ${DEPLOY_PATH}"

- name: Deployment Summary
run: |
echo "## ✅ Deployment Complete!" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**URL:** ${{ steps.vars.outputs.deploy_url }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Deployed:** ${{ steps.vars.outputs.deploy_label }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Commit:** \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "_Deployed at: $(date -u +"%Y-%m-%dT%H:%M:%SZ")_" >> $GITHUB_STEP_SUMMARY

- name: Comment Preview URL on PR
if: github.event_name == 'pull_request' && github.event.action != 'closed'
uses: actions/github-script@v8
with:
script: |
const prNumber = context.payload.pull_request.number;
const previewUrl = `https://${{ env.DEPLOY_SERVER }}/pr/${prNumber}`;
const body = `## 🚀 PR Preview Deployed!\n\nYour changes have been deployed to a preview environment.\n\n**Preview URL:**\n🔗 ${previewUrl}\n\n**Quick Links:**\n- [Getting Started](${previewUrl}/getting-started)\n- [Components](${previewUrl}/components)\n\n> 🧹 Preview will be automatically removed when the PR is closed.\n\n**Commit:** \`${context.sha}\`\n\n---\n_Last deployed: ${new Date().toISOString()}_`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
body: body
});

cleanup-preview:
name: Cleanup PR Preview
runs-on: gomobilesharedstagedeploy
if: github.event_name == 'pull_request' && github.event.action == 'closed'
steps:
- name: Get PR Number
id: pr
run: echo "number=${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT

- name: Setup SSH Key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_USER_SSH_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
ssh-keyscan -H ${{ env.DEPLOY_SERVER }} >> ~/.ssh/known_hosts

- name: Remove Preview Deployment
run: |
PR_NUMBER=${{ steps.pr.outputs.number }}
DEPLOY_PATH="/var/www/goponents/pr/${PR_NUMBER}"
ssh -i ~/.ssh/deploy_key ${{ env.DEPLOY_USER }}@${{ env.DEPLOY_SERVER }} \
"rm -rf ${DEPLOY_PATH}"
echo "✅ Cleaned up preview for PR #${PR_NUMBER}"

- name: Update PR Comment
uses: actions/github-script@v8
with:
script: |
const prNumber = context.payload.pull_request.number;
const body = `## 🧹 PR Preview Removed\n\nThe preview environment for this PR has been cleaned up.\n\n---\n_Removed: ${new Date().toISOString()}_`;
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
});
const botComment = comments.find(comment =>
comment.user.type === 'Bot' &&
comment.body.includes('PR Preview')
);
if (botComment) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: botComment.id,
body: body
});
}
Loading
Loading