Skip to content

chore: setup automatic deploy dev #3

chore: setup automatic deploy dev

chore: setup automatic deploy dev #3

name: deploy to the development environment
on:
push:
branches: [development]
permissions:
contents: read # for checkout
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.LUNA_CD_SSH_HOST }}
username: ${{ secrets.LUNA_CD_SSH_USERNAME }}
key: ${{ secrets.LUNA_CD_SSH_KEY }}
port: ${{ secrets.LUNA_CD_SSH_PORT }}
script_stop: true
script: |
mkdir -p /lunatic/repos;
cd /lunatic/repos;
if [ ! -d luna ] then
git clone https://github.com/sisgha/luna -b development luna;
fi
cd luna;
cd luna-backend;
make dev-down;
git checkout -b temp-fix;
git branch -D development;
git fetch origin;
git checkout -b development;
git pull origin development;
make dev-start;