From 629ae0bf7233e6f1d76c3425210686dd59b49d54 Mon Sep 17 00:00:00 2001 From: Francis Vauterin <159532420+francisvaut@users.noreply.github.com> Date: Tue, 9 Apr 2024 21:49:35 +0200 Subject: [PATCH 1/2] Actions (#277) * build: only run checks when making a pr to dev or main * build: add dispatch trigger to deployement --- .github/workflows/backend-linting.yaml | 2 -- .github/workflows/deployement.yml | 1 + .github/workflows/frontend-linting.yaml | 2 -- .github/workflows/tests.yaml | 2 -- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/backend-linting.yaml b/.github/workflows/backend-linting.yaml index f46741db..773c7f36 100644 --- a/.github/workflows/backend-linting.yaml +++ b/.github/workflows/backend-linting.yaml @@ -1,8 +1,6 @@ name: backend-linting on: - push: - branches: [main, development] pull_request: branches: [main, development] workflow_dispatch: diff --git a/.github/workflows/deployement.yml b/.github/workflows/deployement.yml index 2f227dd2..b58e7852 100644 --- a/.github/workflows/deployement.yml +++ b/.github/workflows/deployement.yml @@ -3,6 +3,7 @@ on: push: branches: - main + workflow_dispatch: jobs: deploy: diff --git a/.github/workflows/frontend-linting.yaml b/.github/workflows/frontend-linting.yaml index d4bdc6d8..bb630557 100644 --- a/.github/workflows/frontend-linting.yaml +++ b/.github/workflows/frontend-linting.yaml @@ -1,8 +1,6 @@ name: frontend-linting on: - push: - branches: [main, development] pull_request: branches: [main, development] workflow_dispatch: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d787cc08..b2ee6a59 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,8 +1,6 @@ name: tests on: - push: - branches: [main, development] pull_request: branches: [main, development] workflow_dispatch: From e24c7363ba25c5829349440dd8a0c3048995fc26 Mon Sep 17 00:00:00 2001 From: Francis Vauterin <159532420+francisvaut@users.noreply.github.com> Date: Tue, 9 Apr 2024 22:28:45 +0200 Subject: [PATCH 2/2] build: change sh -c to bash -c (#278) --- .github/workflows/deployement.yml | 2 +- production.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deployement.yml b/.github/workflows/deployement.yml index b58e7852..eb61c1ac 100644 --- a/.github/workflows/deployement.yml +++ b/.github/workflows/deployement.yml @@ -19,6 +19,6 @@ jobs: script: | cd UGent-7 docker-compose -f production.yml down - git pull + git pull --force docker-compose -f production.yml build --no-cache docker-compose -f production.yml up -d diff --git a/production.yml b/production.yml index 13aacc0b..d58814e4 100644 --- a/production.yml +++ b/production.yml @@ -64,7 +64,7 @@ services: build: context: $BACKEND_DIR dockerfile: Dockerfile - command: sh -c "./setup.sh && gunicorn --config gunicorn_config.py ypovoli.wsgi:application" + command: bash -c "./setup.sh && gunicorn --config gunicorn_config.py ypovoli.wsgi:application" expose: - 8080 depends_on: