feat(actions): bring back the old deploy script #12
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 Production | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to Oracle VM | |
| uses: appleboy/ssh-action@v1.0.3 | |
| with: | |
| host: ${{ secrets.ORACLE_HOST }} | |
| username: ubuntu | |
| port: 22 | |
| key: ${{ secrets.SSH_KEY }} | |
| script: | | |
| cd PD-Server | |
| git pull origin main | |
| cd docker | |
| docker compose --profile prod up -d --build --remove-orphans | |
| docker image prune -f | |
| docker compose ps |