Skip to content
This repository has been archived by the owner on Dec 15, 2024. It is now read-only.

feat: random-event

feat: random-event #88

Workflow file for this run

name: Deployment
on:
push:
paths:
- 'backend/**'
jobs:
deploy:
if: github.repository_owner == 'one-zero-eight' # Do not run in forks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install sshpass
run: sudo apt-get install -y sshpass
- name: Set up SSH connection
run: |
mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts
- name: Deploy to server
run: |
sshpass -v -p "${{ secrets.SSH_PASSWORD }}" ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "cd ${{ secrets.DEPLOY_PATH }} && git pull origin main && ./deploy.sh"