CI/CD
This commit is contained in:
@@ -2,15 +2,15 @@ name: Frontend CI/CD
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [production]
|
||||||
paths:
|
paths:
|
||||||
- 'frontend/**'
|
- '**'
|
||||||
- '.gitea/workflows/frontend.yml'
|
- '.gitea/workflows/frontend.yml'
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [production]
|
||||||
paths:
|
paths:
|
||||||
- 'frontend/**'
|
- '**'
|
||||||
- '.gitea/workflows/frontend.yml'
|
- '.gitea/workflows/frontend.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -70,19 +70,3 @@ jobs:
|
|||||||
cd frontend
|
cd frontend
|
||||||
npm run lint --if-present
|
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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user