dzioba's voodoo deploy magic

This commit is contained in:
2022-12-11 00:47:24 +01:00
parent acda284da1
commit bb49ea78b4
2 changed files with 27 additions and 0 deletions

21
.github/workflows/deploy.yaml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: Deploy
on:
push:
branches: ["master"]
pull_request:
types: ["closed"]
branches: ["master"]
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Build image
run: docker build -t ${{ github.repository }} .
- name: Deploy image
run: |
docker stop ${{ github.event.repository.name }} || true
docker rm ${{ github.event.repository.name }} || true
docker run -p 127.0.0.1:3000:3000 -d --name ${{ github.event.repository.name }} ${{ github.repository }}