From ddd87a96887dd08264f40b08711b72cae7ed7ad4 Mon Sep 17 00:00:00 2001 From: Mohammad Sajad Pourajam Date: Fri, 20 Mar 2026 23:43:05 +0330 Subject: [PATCH] CI/CD --- .gitea/workflows/frontend.yml | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/frontend.yml b/.gitea/workflows/frontend.yml index a092d08..643e244 100644 --- a/.gitea/workflows/frontend.yml +++ b/.gitea/workflows/frontend.yml @@ -2,15 +2,15 @@ name: Frontend CI/CD on: push: - branches: [main] + branches: [production] paths: - - 'frontend/**' + - '**' - '.gitea/workflows/frontend.yml' pull_request: - branches: [main] + branches: [production] paths: - - 'frontend/**' + - '**' - '.gitea/workflows/frontend.yml' jobs: @@ -70,19 +70,3 @@ jobs: cd frontend npm run lint --if-present - # - name: Setup SSH key - # run: | - # mkdir -p ~/.ssh - # echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 - # chmod 600 ~/.ssh/id_ed25519 - # ssh-keyscan -p ${{secrets.SERVER_SSH_PORT}} -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts - - # - name: Deploy - # if: github.ref == 'refs/heads/main' - # run: | - # ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} -p ${{secrets.SERVER_SSH_PORT}} << 'EOF' - # cd /opt/myproject/frontend - # git pull origin main - # # در صورت استفاده از PM2 یا Systemd: - # sudo systemctl restart frontend - # EOF