Skip to content

0.0.0

0.0.0 #1

Workflow file for this run

name: Deploy to Server
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create SSH key
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
host="${{ secrets.SSH_HOST_IP }}"
hosts="$(dig +short "$host" | grep -v '\.$' | sed -z 's|\n|,|g')$host"
ssh-keyscan -H "$hosts" > ~/.ssh/known_hosts
- name: Deploy on Remote
run: |
ssh -i ~/.ssh/id_rsa ${{ secrets.SSH_HOST_USER }}@${{ secrets.SSH_HOST_IP }} "$( cat <<'EOT'
screen -dRRS DestinyActivityReport
cd DestinyActivityReport
git reset --hard HEAD
git pull
sudo docker-compose up --build --detach
docker system prune -f
EOT
)"