Skip to content

Update deploy.yml

Update deploy.yml #5

Workflow file for this run

name: deploy and build
on:
push:
branches: ["deployment-dev" ]
pull_request:
branches: ["deployment-dev" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Create SSH key
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ../private.key
sudo chmod 600 ../private.key
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
- name: Connect to server
run: |
ssh -T ${{ secrets.SSH_SERVER_ADRESS }} -i ../private.key
pwd
cd nsreg-watcher
docker-compose -f dev.yml down
docker-compose -f dev.yml up --build -d