Compare commits
38 Commits
7886d13405
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67efdc2767 | ||
|
|
1e821629e5 | ||
|
|
8909de8cbe | ||
| c44e053460 | |||
| 2623d39505 | |||
| c245439137 | |||
| b559efc8df | |||
| c07a20afa0 | |||
| 6f22fcbd90 | |||
| 4c87b76e21 | |||
| b3052e2a4a | |||
| d01fdaae59 | |||
| 9c7dfe51a7 | |||
| 6994d7035c | |||
| 6783226d73 | |||
| 5f5dca2162 | |||
| ba692d8c26 | |||
| e42f5f5245 | |||
| 1440b80489 | |||
| 8de25f383c | |||
| 96107e38da | |||
| 8af10bb49b | |||
| ab27413e3f | |||
| af8cff971e | |||
| 99351fc72e | |||
| de79112450 | |||
| 32b1689c40 | |||
| 976e3fe19c | |||
| 156f0a04f3 | |||
| 85ee9a7702 | |||
| 6a7e47c3fb | |||
| 6d9c6d5a2c | |||
| 62756e04c3 | |||
| 76ed52481e | |||
| c6ce880435 | |||
| 6c2cfc6e1b | |||
| c972dd1f1c | |||
| 251163aef7 |
12
.dockerignore
Normal file
12
.dockerignore
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
node_modules
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
.angular
|
||||||
|
dist
|
||||||
|
*.md
|
||||||
|
.vscode
|
||||||
|
.idea
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
.DS_Store
|
||||||
|
.gitea
|
||||||
@@ -3,29 +3,81 @@ name: Deploy Portfolio
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Node
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Build Angular
|
|
||||||
run: npm run build -- --configuration production
|
|
||||||
|
|
||||||
- name: Deploy to NAS
|
|
||||||
run: |
|
run: |
|
||||||
echo "Deploy started at $(date)"
|
rm -rf * .git
|
||||||
rm -rf /volume1/web/www/rc-portfolio/*
|
git clone "https://code.chagarlamudi.net/raghu-ch/rc-portfolio.git" .
|
||||||
cp -r dist/* /volume1/web/www/rc-portfolio/
|
|
||||||
echo "Deploy finished at $(date)"
|
- name: Build Docker image
|
||||||
|
run: docker build -t rc-portfolio:latest .
|
||||||
|
|
||||||
|
- name: Stop old container
|
||||||
|
run: docker stop rc-portfolio || true
|
||||||
|
|
||||||
|
- name: Remove old container
|
||||||
|
run: docker rm rc-portfolio || true
|
||||||
|
|
||||||
|
- name: Run new container
|
||||||
|
run: |
|
||||||
|
docker run -d \
|
||||||
|
--name rc-portfolio \
|
||||||
|
--restart unless-stopped \
|
||||||
|
-p 8080:80 \
|
||||||
|
rc-portfolio:latest
|
||||||
|
|
||||||
|
- name: Clean up old images
|
||||||
|
run: docker image prune -f
|
||||||
|
|
||||||
|
- name: Install curl
|
||||||
|
run: |
|
||||||
|
if ! command -v curl >/dev/null 2>&1; then
|
||||||
|
if command -v apt >/dev/null 2>&1; then
|
||||||
|
apt update && sudo apt install -y curl
|
||||||
|
elif command -v apk >/dev/null 2>&1; then
|
||||||
|
apk add curl
|
||||||
|
elif command -v yum >/dev/null 2>&1; then
|
||||||
|
yum install -y curl
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Set Discord mention
|
||||||
|
id: discord
|
||||||
|
run: |
|
||||||
|
echo "mention=<@${{ secrets.DISCORD_ID_RAGHU }}>" >> $GITEA_OUTPUT
|
||||||
|
|
||||||
|
# Success notification
|
||||||
|
- name: Discord Success Notification
|
||||||
|
if: success()
|
||||||
|
run: |
|
||||||
|
curl -X POST -H "Content-Type: application/json" \
|
||||||
|
-d "{
|
||||||
|
\"content\": \"✅ **Deployment SUCCESS**\n\
|
||||||
|
🧑💻 ${{ steps.discord.outputs.mention }}\n\
|
||||||
|
🗂️ Repo: ${{ gitea.repository }}\n\
|
||||||
|
🌲 Branch: ${{ gitea.ref_name }}\n\
|
||||||
|
🧷 Commit: [${{ steps.commit.outputs.short_sha }}](${{ steps.commit.outputs.url }})\n\
|
||||||
|
✏️ Message: ${{ steps.message.outputs.msg }}\"
|
||||||
|
}" \
|
||||||
|
${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
|
|
||||||
|
# Failure notification
|
||||||
|
- name: Discord Failure Notification
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
curl -X POST -H "Content-Type: application/json" \
|
||||||
|
-d "{
|
||||||
|
\"content\": \"❌ **Deployment FAILED**\n\
|
||||||
|
🧑💻 ${{ steps.discord.outputs.mention }}\n\
|
||||||
|
🗂️ Repo: ${{ gitea.repository }}\n\
|
||||||
|
🌲 Branch: ${{ gitea.ref_name }}\n\
|
||||||
|
🧷 Commit: [${{ steps.commit.outputs.short_sha }}](${{ steps.commit.outputs.url }})\n\
|
||||||
|
✏️ Message: ${{ steps.message.outputs.msg }}\n\
|
||||||
|
🔍 Check Gitea Actions logs\"
|
||||||
|
}" \
|
||||||
|
${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"semi": true,
|
"semi": true,
|
||||||
"trailingComma": "es5",
|
"trailingComma": "es5",
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"printWidth": 120,
|
"printWidth": 130,
|
||||||
"tabWidth": 2,
|
"tabWidth": 2,
|
||||||
"endOfLine": "auto",
|
"endOfLine": "auto",
|
||||||
"bracketSpacing": true,
|
"bracketSpacing": true,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ WORKDIR /app
|
|||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|
||||||
# Install specific version of Angular CLI globally
|
# Install specific version of Angular CLI globally
|
||||||
RUN npm install -g @angular/cli
|
# RUN npm install -g @angular/cli
|
||||||
|
|
||||||
# Install project dependencies
|
# Install project dependencies
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
|
|||||||
64
biome.json
64
biome.json
@@ -1,34 +1,34 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
|
"$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
|
||||||
"vcs": {
|
"vcs": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"clientKind": "git",
|
"clientKind": "git",
|
||||||
"useIgnoreFile": true
|
"useIgnoreFile": true
|
||||||
},
|
},
|
||||||
"files": {
|
"files": {
|
||||||
"ignoreUnknown": false
|
"ignoreUnknown": false
|
||||||
},
|
},
|
||||||
"formatter": {
|
"formatter": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"indentStyle": "tab"
|
"indentStyle": "tab"
|
||||||
},
|
},
|
||||||
"linter": {
|
"linter": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"rules": {
|
"rules": {
|
||||||
"recommended": true
|
"recommended": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"javascript": {
|
"javascript": {
|
||||||
"formatter": {
|
"formatter": {
|
||||||
"quoteStyle": "double"
|
"quoteStyle": "single"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"assist": {
|
"assist": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"actions": {
|
"actions": {
|
||||||
"source": {
|
"source": {
|
||||||
"organizeImports": "on"
|
"organizeImports": "on"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
@@ -15,7 +15,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
&__avatar {
|
&__avatar {
|
||||||
background-image: url("../../assests/images/rc-header-logo.jpeg");
|
background-image: url("../../../public/assests/images/rc-header-logo.jpeg");
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
<div class="intro__circle intro__circle--small"></div>
|
<div class="intro__circle intro__circle--small"></div>
|
||||||
</div>
|
</div>
|
||||||
<h1 class="intro__header">Hi 👋, I'm Raghu Chagarlamudi</h1>
|
<h1 class="intro__header">Hi 👋, I'm Raghu Chagarlamudi</h1>
|
||||||
<p class="intro__sub-head">I am a well-versed front-end web developer with extensive experience in building delightful and scalable web applications.</p>
|
<p class="intro__sub-head">
|
||||||
|
I am a well-versed front-end web developer with extensive experience in building delightful and scalable web
|
||||||
|
applications.
|
||||||
|
</p>
|
||||||
<a mat-fab extended href="https://www.google.com/" target="_blank" class="intro__button">Get to Know More About Me</a>
|
<a mat-fab extended href="https://www.google.com/" target="_blank" class="intro__button">Get to Know More About Me</a>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -24,10 +24,10 @@
|
|||||||
&--small {
|
&--small {
|
||||||
height: 200px;
|
height: 200px;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
background-image: url("../../assests/images/rc-logo.jpeg");
|
background-image: url("../../../public//assests/images/rc-logo.jpeg");
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user