Start containers in cloud service by BHyeonKim #5
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: Start services | |
| run-name: Start containers in cloud service by ${{ github.actor }} | |
| on: | |
| workflow_run: | |
| workflows: [Copy Compose] | |
| types: | |
| - completed | |
| jobs: | |
| start-services: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Connect to cloud server | |
| uses: appleboy/[email protected] | |
| with: | |
| host: ${{secrets.CLOUD_HOST}} | |
| username: ${{secrets.CLOUD_USERNAME}} | |
| key: ${{secrets.CLOUD_SECRET_KEY}} | |
| port: ${{secrets.CLOUD_PORT}} | |
| script: | | |
| cd ~ | |
| docker compose down --volumes | |
| docker image prune -f | |
| docker compose up -d | |