feat #302
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: C2VN Docker Deployment | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Deploy using Docker | |
| uses: appleboy/ssh-action@master | |
| with: | |
| host: ${{ secrets.HOST }} | |
| username: ${{ secrets.USERNAME }} | |
| password: ${{ secrets.PASSWORD }} | |
| port: 3838 | |
| command_timeout: 30m | |
| script: | | |
| cd /home/tung/c2vn && | |
| git fetch origin && | |
| git checkout main && | |
| git pull && | |
| docker-compose down && | |
| docker system prune -f && | |
| docker-compose build --no-cache --pull && | |
| docker-compose up -d |