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

Merge pull request #271 from habralab/fix/client-bugs #84

Merge pull request #271 from habralab/fix/client-bugs

Merge pull request #271 from habralab/fix/client-bugs #84

name: Deploy stage
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Connect, pull from repo and restart docker
uses: appleboy/ssh-action@v1.0.0
env:
REMOTE_DIR: '/var/www/app/'
DOCKER_COMPOSE_NAME: 'docker-compose.stage.yml'
GIT_CONNECT: 'git@github.com:habralab/garnet-team.git'
SELFSERVICE_FLOWS_REGISTRATION_AFTER_HOOKS_0_CONFIG_AUTH_CONFIG_VALUE: ${{ secrets.GARNET_API_KEY }}
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.FRONT_SSH_KEY }}
debug: true
script_stop: true
envs: REMOTE_DIR,DOCKER_COMPOSE_NAME,GIT_CONNECT,SELFSERVICE_FLOWS_REGISTRATION_AFTER_HOOKS_0_CONFIG_AUTH_CONFIG_VALUE
script: |
eval `ssh-agent -s`
ssh-add ~/.ssh/garnet_web_repo
cd $REMOTE_DIR
git pull $GIT_CONNECT
docker-compose -f $DOCKER_COMPOSE_NAME down && docker-compose -f $DOCKER_COMPOSE_NAME up --force-recreate --build -d
exit 0;