happy new year #239
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy AstroJS Site | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Deploy to VPS via SSH | |
| uses: appleboy/ssh-action@master | |
| with: | |
| host: ${{ secrets.VPS_IP }} | |
| username: ${{ secrets.VPS_USER }} | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| script: | | |
| cd /srv/www/website | |
| sudo git restore . | |
| sudo git pull origin main | |
| sudo npm install | |
| sudo npm run build | |
| sudo pm2 restart edmateo-site | |
| sudo sudo systemctl restart apache2 |