Skip to content

Allow bot to blacklist shiggies #3

Allow bot to blacklist shiggies

Allow bot to blacklist shiggies #3

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configure SSH
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa $SERVER_IP >> ~/.ssh/known_hosts
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SERVER_IP: ${{ secrets.SERVER_IP }}
- name: Deploy
run: |
ssh -i ~/.ssh/id_rsa $SSH_USER@$SERVER_IP "cd $DEPLOY_PATH && git pull origin main && sudo docker compose -f $COMPOSE_FILE up -d --build --wait"
env:
SERVER_IP: ${{ secrets.SERVER_IP }}
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
COMPOSE_FILE: ${{ secrets.COMPOSE_FILE }}
SSH_USER: ${{ secrets.SSH_USER }}