From 0c4907b2c0bd7901bfc9ffe1f2b45f09e7d5e68e Mon Sep 17 00:00:00 2001 From: Izzy Aristide <44146685+IzzyDotExe@users.noreply.github.com> Date: Mon, 7 Oct 2024 20:34:21 -0400 Subject: [PATCH 1/2] ARC-010: add sudo to workflows (#14) Co-authored-by: izzydotexe --- .github/workflows/cd-live.yml | 2 +- .github/workflows/cd.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd-live.yml b/.github/workflows/cd-live.yml index 529e0d1..01001d9 100644 --- a/.github/workflows/cd-live.yml +++ b/.github/workflows/cd-live.yml @@ -19,4 +19,4 @@ jobs: username: ${{ secrets.SSH_USER }} password: ${{ secrets.SSH_PASSWORD }} port: ${{ secrets.SSH_PORT }} - script: cd ${{ vars.ENV }} && ./deploy.sh + script: cd ${{ vars.ENV }} && echo ${{ secrets.SSH_PASSWORD}} | sudo -S ./deploy.sh diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d7b2fc1..bae7cb7 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -19,4 +19,4 @@ jobs: username: ${{ secrets.SSH_USER }} password: ${{ secrets.SSH_PASSWORD }} port: ${{ secrets.SSH_PORT }} - script: cd ${{ vars.ENV }} && ./deploy.sh + script: cd ${{ vars.ENV }} && echo ${{ secrets.SSH_PASSWORD}} | sudo -S ./deploy.sh From ca30375a1c052dad9a494bb1d51496c9fa89625c Mon Sep 17 00:00:00 2001 From: Izzy Aristide <44146685+IzzyDotExe@users.noreply.github.com> Date: Mon, 7 Oct 2024 20:38:25 -0400 Subject: [PATCH 2/2] ARC-010: stg environment 3 (#15) --------- Co-authored-by: izzydotexe --- .github/workflows/cd.yml | 2 +- deploy-stg.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 deploy-stg.sh diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index bae7cb7..7015c23 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -19,4 +19,4 @@ jobs: username: ${{ secrets.SSH_USER }} password: ${{ secrets.SSH_PASSWORD }} port: ${{ secrets.SSH_PORT }} - script: cd ${{ vars.ENV }} && echo ${{ secrets.SSH_PASSWORD}} | sudo -S ./deploy.sh + script: cd ${{ vars.ENV }} && echo ${{ secrets.SSH_PASSWORD}} | sudo -S ./deploy-stg.sh diff --git a/deploy-stg.sh b/deploy-stg.sh new file mode 100644 index 0000000..5916339 --- /dev/null +++ b/deploy-stg.sh @@ -0,0 +1,4 @@ +git pull +git submodule update +docker compose -f docker-compose-stg.yml build +docker compose -f docker-compose-stg.yml up -d