Merge pull request #393 from mezonai/main #299
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 Development Server | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| jobs: | |
| deploy: | |
| runs-on: top-dev | |
| environment: development | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: SSH into server and deploy application | |
| uses: appleboy/ssh-action@v1.2.1 | |
| with: | |
| host: ${{ secrets.SERVER_HOST }} | |
| username: ${{ secrets.SERVER_USER }} | |
| password: ${{ secrets.SERVER_PASSWORD }} | |
| port: 22 | |
| script: | | |
| set -e | |
| export XDG_RUNTIME_DIR=/run/user/$(id -u) | |
| export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock | |
| systemctl --user start docker | |
| cd ~/mezon-top-board | |
| git pull origin dev | |
| ./docker-up.sh --build --dev --core | |
| docker system prune -f |