Skip to content

Commit

Permalink
Issue #PS-000 chore: Updated code with branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Rushikesh-Sonawane99 committed Sep 12, 2024
1 parent 61afd5a commit 0c94437
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 35 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/production-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,44 @@ name: PROD FRONTEND DEPLOYMENT WITH TAG
on:
push:
tags:
- 'v*'
- 'v*'

jobs:
PROD-FRONTEND-TAG-BASE-DEPLOYMENT:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set TAG environment variable
id: get_tag
run: |
# Extract the tag from the ref and set it as an environment variable
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Debug TAG value
run: |
# Print the TAG value to ensure the correct tag is being used
echo "TAG value - ${{ env.TAG }}"
- name: Deploy Stack
uses: appleboy/ssh-action@master
with:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set TAG environment variable
id: get_tag
run: |
# Extract the tag from the ref and set it as an environment variable
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Debug TAG value
run: |
# Print the TAG value to ensure the correct tag is being used
echo "TAG value - ${{ env.TAG }}"
- name: Deploy Stack
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST_NAME_PROD }}
username: ${{ secrets.USERNAME_PROD }}
key: ${{ secrets.SSH_KEY_PROD }}
port: ${{ secrets.PORT_PROD }}
script: |
# Assign the TAG value from the environment variable
TAG="${{ env.TAG }}"
# Define the target directory and environment file
TARGET_DIR="${{ secrets.TARGET_DIR_PROD }}"
ENVIRONMENT="$TARGET_DIR/.env"
# Remove the existing .env file if it exists
if [ -f "$ENVIRONMENT" ]; then
rm "$ENVIRONMENT"
Expand All @@ -58,4 +58,4 @@ jobs:
ls -ltra
# Run the deployment script with the correct TAG
./deploy.sh $TAG
./deploy.sh $TAG
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=tekdi_teachers-app&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=tekdi_teachers-app)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=tekdi_teachers-app&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=tekdi_teachers-app)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=tekdi_teachers-app&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=tekdi_teachers-app)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=tekdi_teachers-app&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=tekdi_teachers-app)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=tekdi_teachers-app&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=tekdi_teachers-app)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=tekdi_teachers-app&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=tekdi_teachers-app)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=tekdi_teachers-app&metric=bugs)](https://sonarcloud.io/summary/new_code?id=tekdi_teachers-app)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=tekdi_teachers-app&metric=coverage)](https://sonarcloud.io/summary/new_code?id=tekdi_teachers-app)

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
# Shiksha: Teachers-application

## What is Shiksha?
Expand Down Expand Up @@ -75,5 +65,4 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next
2. To build the application use
```console
npm run build
```
#
```

0 comments on commit 0c94437

Please sign in to comment.