diff --git a/.gitea/workflows/deploy.yml.bak b/.gitea/workflows/deploy.yml.bak deleted file mode 100644 index fbe5d1f..0000000 --- a/.gitea/workflows/deploy.yml.bak +++ /dev/null @@ -1,85 +0,0 @@ -name: Klc-HR-Dashboard-Frontend - -on: - push: - branches: - - beta - - testing - - client - - staging - - production - pull_request: - branches: - - main - - beta - - testing - - client - - staging - - production -jobs: - Klc-HR-Dashboard-Build-Test: - name: Build and Test PR - if: github.event_name == 'pull_request' - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v3 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - name: Installing Dependecies - run: npm i - - name: Check Build - run: npm run build - - name: Auditing Node Dependecies - run: npm audit --audit-level=critical - - KLC-Deployment: - name: Deploying code in Server - if: github.event_name == 'push' - runs-on: ubuntu-latest - env: - ENV_FILE: ${{vars.ENV_FILE}} - - steps: - - name: Checkout Code in Runner - uses: actions/checkout@v3 - - name: Determining Project Folder - run: | - echo "Detected Branch Name : ${{ gitea.ref_name }}" - BRANCH_NAME=${{ gitea.ref_name }} - case "$BRANCH_NAME" in - beta) - echo "PROJECT_FOLDER=null" >> $GITHUB_ENV - ;; - testing) - echo "PROJECT_FOLDER=/home/klc/klc-frontend/Test_Release/klc-learner" >> $GITHUB_ENV - ;; - client) - echo "PROJECT_FOLDER=null" >> $GITHUB_ENV - ;; - *) - echo " UNKNOWN BRANCH" - exit 1 - ;; - esac - echo "BRANCH_NAME=${{ gitea.ref_name }}" >> $GITHUB_ENV - - name: Deploy Using SSH - uses: appleboy/ssh-action@v1 - with: - host: ${{ secrets.BETA_SERVER_HOST }} - username: ${{ secrets.BETA_SERVER_USERNAME }} - password: ${{ secrets.BETA_SERVER_PASSWORD }} - port: ${{ secrets.BETA_SERVER_PORT }} - envs: BRANCH_NAME,PROJECT_FOLDER,ENV_FILE - script: | - set -xe - cd $PROJECT_FOLDER - git fetch - git reset --hard origin/$BRANCH_NAME - git stash && git stash clear - git pull origin $BRANCH_NAME - echo "Node Module Installation " - npm i - echo "Building..." - npm run build