Skip to content

update examples

update examples #48

Workflow file for this run

name: deploy
on:
push:
branches:
- master
paths-ignore:
- '**/terraform/**'
- '**/README.md'
- '**/.gitignore'
jobs:
copy_files:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: rsync deployments
uses: burnett01/[email protected]
with:
switches: -avzr --quiet --include="docker-compose.yaml" --exclude="*"
remote_path: /srv/infrastructure
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_port: ${{ secrets.DEPLOY_PORT }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}
start_docker:
needs: copy_files
runs-on: ubuntu-20.04
steps:
- name: create secrets
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
port: ${{ secrets.DEPLOY_PORT }}
script: cd /srv/infrastructure; echo "${{ secrets.DOCKER_COMPOSE_ENV }}" > .env
- name: update images
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
port: ${{ secrets.DEPLOY_PORT }}
script: cd /srv/infrastructure; docker-compose pull
- name: start services
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
port: ${{ secrets.DEPLOY_PORT }}
script: cd /srv/infrastructure; docker-compose up -d --remove-orphans