From e91c34da27d81db00470efb1b95a2461f90c0e98 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Sun, 27 Oct 2019 16:20:50 +0100 Subject: [PATCH] Add GitHub Actions workflow for auto deployments --- .github/workflows/deploy.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..b1dbbcc --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: Deploy + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Deploy the Voila Gallery + uses: appleboy/ssh-action@v0.0.4 + with: + host: ${{ secrets.VOILA_GALLERY_HOST }} + username: ${{ secrets.VOILA_GALLERY_SSH_USERNAME }} + key: ${{ secrets.VOILA_GALLERY_SSH_PRIVATE_KEY }} + script: | + sudo /opt/tljh/hub/bin/python3 -m pip install -U git+https://github.com/voila-dashboards/gallery@master#"egg=tljh-voila-gallery&subdirectory=tljh-voila-gallery" + sudo systemctl restart jupyterhub.service + sudo systemctl status jupyterhub.service + + - name: Check voila-gallery.org is reachable + run: | + sleep 5 + curl -sSf https://voila-gallery.org > /dev/null