Skip to content

Commit

Permalink
Add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
silasprincipe committed Dec 17, 2024
1 parent 495ec72 commit d9e5b3b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy to server
on:
workflow_dispatch:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Install sshpass
run: sudo apt-get install sshpass

- name: Deploy
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
run: |
sshpass -p "$SSH_PASSWORD" ssh -o StrictHostKeyChecking=no "$SSH_USER"@shiny.obis.org 'cd .. && cd data/shiny/shinyapps/distmaps && git pull && Rscript build.R && docker restart shiny'

0 comments on commit d9e5b3b

Please sign in to comment.