Update .gitignore (#11) #6
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 to Jelastic | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Deploy via SSH to Jelastic | |
| uses: appleboy/ssh-action@v1.0.3 | |
| with: | |
| host: ${{ secrets.JELASTIC_HOST }} | |
| username: ${{ secrets.JELASTIC_USER }} | |
| key: ${{ secrets.JELASTIC_SSH_KEY }} | |
| port: ${{ secrets.JELASTIC_PORT }} | |
| script: | | |
| cd /opt/bl-app | |
| git pull origin main | |
| docker build -t biography-library . | |
| docker stop bl-app || true | |
| docker rm bl-app || true | |
| docker run -d \ | |
| --name bl-app \ | |
| --restart unless-stopped \ | |
| -p 80:80 \ | |
| --env-file .env \ | |
| biography-library | |
| docker image prune -f | |
| echo "Deploy completato: $(date)" |