remove old pipeline
This commit is contained in:
68
.github/workflows/docker-image.yml
vendored
68
.github/workflows/docker-image.yml
vendored
@@ -1,68 +0,0 @@
|
|||||||
name: Build and deploy
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
paths-ignore:
|
|
||||||
- '.github/**'
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
paths-ignore:
|
|
||||||
- '.github/**'
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
logLevel:
|
|
||||||
description: 'Log level'
|
|
||||||
required: true
|
|
||||||
default: 'warning'
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- info
|
|
||||||
- warning
|
|
||||||
- debug
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Get branch data
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push image
|
|
||||||
uses: docker/build-push-action@v2
|
|
||||||
with:
|
|
||||||
push: true
|
|
||||||
tags: gurtsn/calendar-front:master
|
|
||||||
deploy:
|
|
||||||
needs: build
|
|
||||||
name: Deploy to host
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Get branch data
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Deploying changes
|
|
||||||
uses: appleboy/ssh-action@master
|
|
||||||
with:
|
|
||||||
host: ${{ secrets.SSH_HOST }}
|
|
||||||
username: ${{ secrets.SSH_USERNAME }}
|
|
||||||
password: ${{ secrets.SSH_PASSWORD }}
|
|
||||||
script: |
|
|
||||||
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
docker pull gurtsn/calendar-front:master
|
|
||||||
cd docker
|
|
||||||
docker-compose stop -t 1 frontend && docker-compose rm -f frontend
|
|
||||||
docker-compose up -d frontend
|
|
||||||
docker image rm $(docker image ls -f dangling=true -q)
|
|
||||||
Reference in New Issue
Block a user