Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vuedev2113 authored Oct 12, 2024
1 parent e5f8671 commit aa7902f
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1 @@
name: Deploy to VPS

on:
workflow_dispatch:
push:
branches: [ main ]

jobs:
sonar:
name: SonarQube
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- name: SonarQube Quality Gate
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
deploy:
runs-on: ubuntu-latest
needs: sonar
steps:
- name: Deploy using ssh
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USERNAME }}
key: ${{ secrets.VPS_PRIVATE_KEY }}
port: ${{ secrets.VPS_PORT }}
script: |
cd ~/nuchat
git pull --rebase origin main
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
npm ci
npm run prod

0 comments on commit aa7902f

Please sign in to comment.