This commit is contained in:
2026-03-20 23:43:05 +03:30
parent 6b4eb16733
commit ddd87a9688
+4 -20
View File
@@ -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