Update deploy workflow: set working directory and simplify
This commit is contained in:
@@ -1,23 +1,11 @@
|
|||||||
name: Deploy to Production
|
|
||||||
run-name: Deploy to Production by @${{ github.actor }}
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Build and deploy with Docker Compose
|
- name: Deploy n
|
||||||
|
working-directory: /home/gkucmierz/docker/nonograms-app
|
||||||
run: |
|
run: |
|
||||||
# Próba zatrzymania i usunięcia starego kontenera (ignoruje błąd jeśli nie istnieje)
|
|
||||||
docker compose down --remove-orphans || true
|
docker compose down --remove-orphans || true
|
||||||
docker rm -f nonograms-app || true
|
docker compose up -d --build
|
||||||
|
|
||||||
# Start nowej wersji
|
|
||||||
docker compose up -d --build
|
|
||||||
Reference in New Issue
Block a user