From ce05006b5799bd853e933e2e8bda936e868f8aa1 Mon Sep 17 00:00:00 2001 From: Saahil Date: Fri, 6 Sep 2024 13:28:40 -0400 Subject: [PATCH] chore: changes (#4) ## features --- .github/workflows/deploy.yml | 35 +++++++++++++++--------------- justfile | 8 +++++++ src/components/AboutPage/index.tsx | 20 ++++++++++++++++- 3 files changed, 44 insertions(+), 19 deletions(-) create mode 100644 justfile diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d4f97c52..72b5eb77 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,29 +12,28 @@ on: workflow_dispatch: jobs: - build: name: Build & deploy runs-on: ubuntu-latest environment: production steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - name: Set Short SHA - id: short_sha - run: | - echo $(pwd) - echo $(ls) - echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - - name: executing remote ssh commands using password - uses: appleboy/ssh-action@v0.1.8 - with: - context: . - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - port: ${{ secrets.PORT }} - script: | + - name: Checkout Repository + uses: actions/checkout@v3 + - name: Set Short SHA + id: short_sha + run: | + echo $(pwd) + echo $(ls) + echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: executing remote ssh commands using password + uses: appleboy/ssh-action@v0.1.8 + with: + context: . + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + port: ${{ secrets.PORT }} + script: | cd /${{ secrets.USERNAME }} export REACT_APP_BUILD_SHA=${{ steps.short_sha.outputs.short_sha }} export REACT_APP_BUILD_ID=${{ github.run_id }} diff --git a/justfile b/justfile new file mode 100644 index 00000000..b6cd4c2f --- /dev/null +++ b/justfile @@ -0,0 +1,8 @@ +run: + yarn start + +build: + yarn build + +install: + yarn install \ No newline at end of file diff --git a/src/components/AboutPage/index.tsx b/src/components/AboutPage/index.tsx index c4b22438..ab6934e2 100644 --- a/src/components/AboutPage/index.tsx +++ b/src/components/AboutPage/index.tsx @@ -1,7 +1,25 @@ import { mdiBullet } from '@mdi/js' import Icon from '@mdi/react' +import { useEffect, useState } from 'react' export default function AboutPage () { + const [currentGrade, setCurrentGrade] = useState("0th") + useEffect(() => { + let year:number = new Date().getFullYear() + if (year > 2027) { +let result = year - 2027 + switch(result) { +case 0: + setCurrentGrade(`12th`) + break; + default: +setCurrentGrade(`Collage Student`) + break; + } + } else { + setCurrentGrade(`${Math.abs((2027 - 2024) - 13)}th`) + } + }) return

@@ -13,7 +31,7 @@ Some info about me Hi Everyone, I am{' '} Saahil dutta, from USA -
I am a 9th grader in KCD. +
I am a {currentGrade} grader in KCD.

Apart from coding, some other activities that I love to do!