update versioning client #152
This file contains 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: WhatColors BackEnd | |
on: | |
push: | |
branches: ["main"] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Deploy to cloud server | |
uses: fifsky/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
user: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
port: 22 | |
command: | | |
git clone https://github.com/Z4nR/WhatColors | |
cd ~/WhatColors | |
git pull origin main | |
cd server | |
docker compose down --remove-orphans | |
docker compose --project-name whatcolors up --build -d | |
docker image prune -a |