Skip to content

Merge branch 'main' of https://github.com/BIG-MAP/big-map-graph #4

Merge branch 'main' of https://github.com/BIG-MAP/big-map-graph

Merge branch 'main' of https://github.com/BIG-MAP/big-map-graph #4

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
env:
SSH_USER: lhendrix
SSH_HOST: 51.68.188.78
jobs:
deploy:
name: Deploy streamlit app
runs-on: ubuntu-latest
steps:
- name: Install SSH keys
run: |
mkdir -p ~/.ssh
echo "${{ secrets.ACTIONS_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ env.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Test SSH Connection
run: ssh -o StrictHostKeyChecking=no ${{ env.SSH_USER }}@${{ env.SSH_HOST }} "echo SSH connection successful"
- name: Pull Changes from Repository
run: |
ssh ${{ env.SSH_USER }}@${{ env.SSH_HOST }} "cd /home/lhendrix/big-map-graph && git pull"
- name: Restart Streamlit Server
run: |
ssh ${{ env.SSH_USER }}@${{ env.SSH_HOST }} "echo '${{ secrets.SUDO_PASSWORD }}' | sudo -S nohup /home/lhendrix/big-map-graph/venv/bin/streamlit run --server.port 443 /home/lhendrix/big-map-graph/app.py > /dev/null 2>&1 &"