Skip to content

Merge pull request #126 from mju-likelion/hotfix/db-restore-#124 #23

Merge pull request #126 from mju-likelion/hotfix/db-restore-#124

Merge pull request #126 from mju-likelion/hotfix/db-restore-#124 #23

Workflow file for this run

name: cicd
on:
push:
branches: [develop]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_PASSWORD}}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME}}/${{secrets.DOCKER_IMAGE_NAME}}:latest
push-args: --disable-content-trust
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: ssh connect & production
uses: appleboy/[email protected]
with:
host: ${{secrets.HOST}}
username: ${{secrets.USERNAME}}
key: ${{secrets.PASSWORD}}
script: |
docker login --username ${{secrets.DOCKERHUB_USERNAME}} --password ${{secrets.DOCKERHUB_PASSWORD}}
docker system prune -a --volumes -f
docker compose pull -q
docker compose up --force-recreate --build -d --quiet-pull 2>log.out
cat log.out