diff --git a/.github/workflows/production-deployment.yaml b/.github/workflows/production-deployment.yaml index 69517404d..5f36b7a0d 100644 --- a/.github/workflows/production-deployment.yaml +++ b/.github/workflows/production-deployment.yaml @@ -2,32 +2,32 @@ 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 }} @@ -35,11 +35,11 @@ jobs: 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" @@ -58,4 +58,4 @@ jobs: ls -ltra # Run the deployment script with the correct TAG - ./deploy.sh $TAG + ./deploy.sh $TAG \ No newline at end of file diff --git a/README.md b/README.md index cef4a3f47..820bf9d15 100644 --- a/README.md +++ b/README.md @@ -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? @@ -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 - ``` -# + ``` \ No newline at end of file