noteshare.space/.github/workflows/deploy.yaml

29 lines
767 B
YAML
Raw Normal View History

name: Test and deploy server and webapp
on:
push:
branches: [master]
jobs:
# test:
# name: Run tests
# uses: mcndt/noteshare.space/.github/workflows/test.yaml@master
deploy:
name: Deploy
# needs: [test]
runs-on: ubuntu-latest
steps:
- name: Deploy using ssh
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
port: 22
2022-08-04 11:42:35 +03:00
script_stop: true
script: |
cd /home/noteshare/noteshare.space
git pull origin master
docker compose -f docker-compose.server.yml build
docker compose -f docker-compose.server.yml up -d