From 3123fd117b5be04d7d69ae342adc4fe4cee27c99 Mon Sep 17 00:00:00 2001 From: kingslayerrq Date: Mon, 4 Dec 2023 00:09:51 -0500 Subject: [PATCH 1/9] try --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..8c53b6e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Deploy to DigitalOcean + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: CICD + uses: appleboy/ssh-action@v0.1.2 + with: + host: ${{secrets.SSH_HOST_RQ}} + key: ${{secrets.SSH_KEY_RQ}} + username: ${{secrests.SSH_USERNAME_RQ}} + + script: | + mkdir test + cd test + git clone git@github.com:software-students-fall2023/4-containerized-app-exercise-rizzballs.git + echo 'deploy success' + + From a0d9f6d9492e58cfba64fe33cb73e241d50b164d Mon Sep 17 00:00:00 2001 From: kingslayerrq Date: Mon, 4 Dec 2023 00:13:55 -0500 Subject: [PATCH 2/9] try --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c53b6e..84462f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,8 +2,9 @@ name: Deploy to DigitalOcean on: push: - branches: - - main + branches: ["main"] + pull_request: + branches: ["main"] jobs: deploy: From d33ec7941da957d70f917452f21e9b1275de7449 Mon Sep 17 00:00:00 2001 From: kingslayerrq Date: Mon, 4 Dec 2023 00:17:22 -0500 Subject: [PATCH 3/9] try --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 84462f2..1b44baa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: with: host: ${{secrets.SSH_HOST_RQ}} key: ${{secrets.SSH_KEY_RQ}} - username: ${{secrests.SSH_USERNAME_RQ}} + username: ${{secrets.SSH_USERNAME_RQ}} script: | mkdir test From 553e9afae2a652f58b6df911fcdfc0b5ba3c91ed Mon Sep 17 00:00:00 2001 From: kingslayerrq Date: Mon, 4 Dec 2023 00:28:24 -0500 Subject: [PATCH 4/9] try --- .github/workflows/build.yml | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1b44baa..77eda3b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,19 +9,30 @@ on: jobs: deploy: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.11"] steps: - - name: CICD - uses: appleboy/ssh-action@v0.1.2 - with: - host: ${{secrets.SSH_HOST_RQ}} - key: ${{secrets.SSH_KEY_RQ}} - username: ${{secrets.SSH_USERNAME_RQ}} - - script: | - mkdir test - cd test - git clone git@github.com:software-students-fall2023/4-containerized-app-exercise-rizzballs.git - echo 'deploy success' + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: CICD + uses: appleboy/ssh-action@v0.1.2 + with: + host: ${{secrets.SSH_HOST_RQ}} + key: ${{secrets.SSH_KEY_RQ}} + username: ${{secrets.SSH_USERNAME_RQ}} + script: | + cd 4-containerized-app-exercise-rizzballs/ + docker container prune -f + docker image prune -f + docker volume prune -f + docker-compose pull + docker-compose down + docker-compose up -d From 5798c55390846e2b40cd7e8c8741d137c863de09 Mon Sep 17 00:00:00 2001 From: kingslayerrq Date: Mon, 4 Dec 2023 00:45:25 -0500 Subject: [PATCH 5/9] debug --- .github/workflows/build.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 77eda3b..08a3c4a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,14 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} + + - name: Debug SSH Key + run: | + echo "${{ secrets.SSH_KEY_RQ }}" + - name: Debug SSH Username + run: | + echo "${{ secrets.SSH_USERNAME_RQ }}" + - name: CICD uses: appleboy/ssh-action@v0.1.2 with: From 277ad6bcba0bec1da54d85fa543979f73bd303b1 Mon Sep 17 00:00:00 2001 From: kingslayerrq Date: Mon, 4 Dec 2023 01:09:01 -0500 Subject: [PATCH 6/9] try --- .github/workflows/build.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08a3c4a..267f9d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,13 +22,8 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Debug SSH Key - run: | - echo "${{ secrets.SSH_KEY_RQ }}" - - name: Debug SSH Username - run: | - echo "${{ secrets.SSH_USERNAME_RQ }}" - + + - name: CICD uses: appleboy/ssh-action@v0.1.2 with: From 86b1d3a7599ef2ebe4283828f5ad3066ef65e786 Mon Sep 17 00:00:00 2001 From: kingslayerrq Date: Mon, 4 Dec 2023 01:13:09 -0500 Subject: [PATCH 7/9] try --- .github/workflows/build.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 267f9d2..b8da68c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,10 +32,7 @@ jobs: username: ${{secrets.SSH_USERNAME_RQ}} script: | - cd 4-containerized-app-exercise-rizzballs/ - docker container prune -f - docker image prune -f - docker volume prune -f - docker-compose pull - docker-compose down - docker-compose up -d + mkdir rb + cd rb + git clone git@github.com:software-students-fall2023/4-containerized-app-exercise-rizzballs.git + echo 'success' From c6a11777e55106581e7a408784eb3fe6f73495f3 Mon Sep 17 00:00:00 2001 From: kingslayerrq Date: Mon, 4 Dec 2023 01:48:00 -0500 Subject: [PATCH 8/9] try --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8da68c..b0fde29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - + - name: CICD uses: appleboy/ssh-action@v0.1.2 @@ -32,7 +32,7 @@ jobs: username: ${{secrets.SSH_USERNAME_RQ}} script: | - mkdir rb cd rb - git clone git@github.com:software-students-fall2023/4-containerized-app-exercise-rizzballs.git - echo 'success' + docker-compose pull + docker-compose down + docker-compose up -d From 2a4ee741e17bba97aabad14a545ee920029c0c52 Mon Sep 17 00:00:00 2001 From: kingslayerrq Date: Mon, 4 Dec 2023 01:56:56 -0500 Subject: [PATCH 9/9] try --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0fde29..fe2fd84 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,10 @@ jobs: username: ${{secrets.SSH_USERNAME_RQ}} script: | - cd rb + cd rb/4-containerized-app-exercise-rizzballs/ + docker container prune -f + docker image prune -f + docker volume prune -f docker-compose pull docker-compose down docker-compose up -d