From c9474afec1b90c0a9d0a077f667ff5cceb3e8ab6 Mon Sep 17 00:00:00 2001 From: Ravencodess <115118888+Ravencodess@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:15:47 +0100 Subject: [PATCH 1/9] Update production-deployment.yml Signed-off-by: Ravencodess <115118888+Ravencodess@users.noreply.github.com> --- .github/workflows/production-deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/production-deployment.yml b/.github/workflows/production-deployment.yml index 3e9869d13..fc838a57f 100644 --- a/.github/workflows/production-deployment.yml +++ b/.github/workflows/production-deployment.yml @@ -66,4 +66,4 @@ jobs: cd ~/hng_boilerplate_nextjs/prod tar -xzf nextjs-prod.tar.gz rm -f nextjs-prod.tar.gz - pm2 restart nextjs_boilerplate_prod --update-env + pm2 restart boilerplate_fe_prod --update-env From 66d32630850e1ef9a94ca72961eb181ad97c864b Mon Sep 17 00:00:00 2001 From: Ravencodess <115118888+Ravencodess@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:16:44 +0100 Subject: [PATCH 2/9] Update staging-deployment.yml Signed-off-by: Ravencodess <115118888+Ravencodess@users.noreply.github.com> --- .github/workflows/staging-deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staging-deployment.yml b/.github/workflows/staging-deployment.yml index 5675faccd..a5e9ec647 100644 --- a/.github/workflows/staging-deployment.yml +++ b/.github/workflows/staging-deployment.yml @@ -66,4 +66,4 @@ jobs: cd ~/hng_boilerplate_nextjs/staging tar -xzf nextjs-staging.tar.gz rm -f nextjs-staging.tar.gz - pm2 restart nextjs_boilerplate_staging --update-env + pm2 restart boilerplate_fe_staging --update-env From e32fd2f7e777c1e61de1e1a309abe3e414636082 Mon Sep 17 00:00:00 2001 From: Ravencodess <115118888+Ravencodess@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:17:08 +0100 Subject: [PATCH 3/9] Delete .github/workflows/anchor-deploy.yaml Signed-off-by: Ravencodess <115118888+Ravencodess@users.noreply.github.com> --- .github/workflows/anchor-deploy.yaml | 98 ---------------------------- 1 file changed, 98 deletions(-) delete mode 100644 .github/workflows/anchor-deploy.yaml diff --git a/.github/workflows/anchor-deploy.yaml b/.github/workflows/anchor-deploy.yaml deleted file mode 100644 index 96ab888e9..000000000 --- a/.github/workflows/anchor-deploy.yaml +++ /dev/null @@ -1,98 +0,0 @@ -name: Anchor Deployment - -on: - workflow_dispatch: - # workflow_run: - # workflows: ["Build and Upload"] - # types: - # - completed - -jobs: - deploy_to_java: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - environment: - name: "anchor-java" - url: ${{ vars.URL }} - - steps: - - name: Download build artifact - uses: actions/download-artifact@v4 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ github.event.workflow_run.id }} - name: boilerplate-build - path: . - - - name: Decode and create .env file - run: | - echo ${{ secrets.ENV }} | base64 -d > .env.java - - - name: Copy Artifacts to server - uses: appleboy/scp-action@v0.1.7 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - source: ".env.java,boilerplate.tar.gz" - target: "/tmp/java" - - - name: Deploy on server - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd hng_boilerplate_nextjs - tar -xzf /tmp/java/boilerplate.tar.gz - mv /tmp/java/.env.java .env - rm -f /tmp/java/boilerplate.tar.gz - cp -r .next/standalone/* . - pm2 restart nextjs_boilerplate --update-env - - - deploy_to_python: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - environment: - name: "anchor-python" - url: ${{ vars.URL }} - - steps: - - name: Download build artifact - uses: actions/download-artifact@v4 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ github.event.workflow_run.id }} - name: boilerplate-build - path: . - - - name: Decode and create .env file - run: | - echo ${{ secrets.ENV }} | base64 -d > .env.python - - - name: Copy Artifacts to server - uses: appleboy/scp-action@v0.1.7 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - source: ".env.python,boilerplate.tar.gz" - target: "/tmp/python" - - - name: Deploy on server - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd hng_boilerplate_nextjs - tar -xzf /tmp/python/boilerplate.tar.gz - mv /tmp/python/.env.python .env - rm -f /tmp/python/boilerplate.tar.gz - cp -r .next/standalone/* . - pm2 restart nextjs_boilerplate --update-env From 602dd7da3cf7fed8665873b22017d4fdb086aa9a Mon Sep 17 00:00:00 2001 From: Ravencodess <115118888+Ravencodess@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:17:30 +0100 Subject: [PATCH 4/9] Delete .github/workflows/bulldozer-php-deployment.yml Signed-off-by: Ravencodess <115118888+Ravencodess@users.noreply.github.com> --- .../workflows/bulldozer-php-deployment.yml | 53 ------------------- 1 file changed, 53 deletions(-) delete mode 100644 .github/workflows/bulldozer-php-deployment.yml diff --git a/.github/workflows/bulldozer-php-deployment.yml b/.github/workflows/bulldozer-php-deployment.yml deleted file mode 100644 index f37251921..000000000 --- a/.github/workflows/bulldozer-php-deployment.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Bulldozer PHP Deployment - -on: - workflow_dispatch: - # workflow_run: - # workflows: ["Build and Upload"] - # types: - # - completed - -jobs: - deploy_boilerplate_frontend: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - environment: - name: "bulldozer-php" - url: ${{ vars.URL }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Download build artifact - uses: actions/download-artifact@v4 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ github.event.workflow_run.id }} - name: boilerplate-build - path: . - - - - name: Copy Artifacts to server - uses: appleboy/scp-action@v0.1.7 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - source: "boilerplate.tar.gz" - target: "/var/www/boilerplate_fe/dev" - - - name: Deploy on server - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd /var/www/boilerplate_fe/dev - rm -rf .next - rm -rf public - tar -xzf boilerplate.tar.gz - rm -f boilerplate.tar.gz - pm2 restart boilerplate-frontend --update-env From aa817908c710a09de2b68ff2f7d2fe1602c5be35 Mon Sep 17 00:00:00 2001 From: Ravencodess <115118888+Ravencodess@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:17:58 +0100 Subject: [PATCH 5/9] Delete .github/workflows/kimiko-csharp-deployment.yaml Signed-off-by: Ravencodess <115118888+Ravencodess@users.noreply.github.com> --- .../workflows/kimiko-csharp-deployment.yaml | 65 ------------------- 1 file changed, 65 deletions(-) delete mode 100644 .github/workflows/kimiko-csharp-deployment.yaml diff --git a/.github/workflows/kimiko-csharp-deployment.yaml b/.github/workflows/kimiko-csharp-deployment.yaml deleted file mode 100644 index e392f6082..000000000 --- a/.github/workflows/kimiko-csharp-deployment.yaml +++ /dev/null @@ -1,65 +0,0 @@ -name: Kimiko Csharp Deployment - -on: - workflow_dispatch: - # workflow_run: - # workflows: ["Build and Upload"] - # types: - # - completed - -jobs: - deploy_boilerplate_frontend: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - environment: - name: "kimiko-csharp" - url: ${{ vars.URL }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Download build artifact - uses: actions/download-artifact@v4 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ github.event.workflow_run.id }} - name: boilerplate-build - path: . - - - name: Create .env - uses: vicradon/create-env-action@v1.0.1 - with: - action_input_file: ".env.sample" - action_output_file: ".env" - API_URL: ${{ vars.API_URL }} - NEXTAUTH_URL: ${{ vars.URL }} - GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} - TWITTER_CLIENT_ID: ${{ secrets.TWITTER_CLIENT_ID }} - GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} - TWITTER_CLIENT_SECRET: ${{ secrets.TWITTER_CLIENT_SECRET }} - AUTH_SECRET: ${{ secrets.AUTH_SECRET }} - - - name: Copy Artifacts to server - uses: appleboy/scp-action@v0.1.7 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - source: ".env,boilerplate.tar.gz" - target: "~/deployments/hng_boilerplate_nextjs" - - - name: Deploy on server - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd ~/deployments/hng_boilerplate_nextjs - tar -xzf boilerplate.tar.gz - rm -f boilerplate.tar.gz - git reset --hard - git pull origin dev - pm2 restart boilerplate-frontend --update-env From da4aabbe2472f9f2e7bd0c655f077e4ec3b55b00 Mon Sep 17 00:00:00 2001 From: Ravencodess <115118888+Ravencodess@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:18:10 +0100 Subject: [PATCH 6/9] Delete .github/workflows/kimiko-golang-deployment.yml Signed-off-by: Ravencodess <115118888+Ravencodess@users.noreply.github.com> --- .../workflows/kimiko-golang-deployment.yml | 65 ------------------- 1 file changed, 65 deletions(-) delete mode 100644 .github/workflows/kimiko-golang-deployment.yml diff --git a/.github/workflows/kimiko-golang-deployment.yml b/.github/workflows/kimiko-golang-deployment.yml deleted file mode 100644 index d33153b04..000000000 --- a/.github/workflows/kimiko-golang-deployment.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Kimiko Golang Deployment - -on: - workflow_dispatch: - # workflow_run: - # workflows: ["Build and Upload"] - # types: - # - completed - -jobs: - deploy_boilerplate_frontend: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - environment: - name: "kimiko-golang" - url: ${{ vars.URL }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Download build artifact - uses: actions/download-artifact@v4 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ github.event.workflow_run.id }} - name: boilerplate-build - path: . - - - name: Create .env - uses: vicradon/create-env-action@v1.0.1 - with: - action_input_file: ".env.sample" - action_output_file: ".env" - API_URL: ${{ vars.API_URL }} - NEXTAUTH_URL: ${{ vars.URL }} - GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }} - TWITTER_CLIENT_ID: ${{ secrets.TWITTER_CLIENT_ID }} - GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }} - TWITTER_CLIENT_SECRET: ${{ secrets.TWITTER_CLIENT_SECRET }} - AUTH_SECRET: ${{ secrets.AUTH_SECRET }} - - - name: Copy Artifacts to server - uses: appleboy/scp-action@v0.1.7 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - source: ".env,boilerplate.tar.gz" - target: "~/deployments/hng_boilerplate_nextjs" - - - name: Deploy on server - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd ~/deployments/hng_boilerplate_nextjs - tar -xzf boilerplate.tar.gz - rm -f boilerplate.tar.gz - git reset --hard - git pull origin dev - pm2 restart boilerplate-frontend --update-env From f5af6879024072caf505416d672d01818dcd9aca Mon Sep 17 00:00:00 2001 From: Ravencodess <115118888+Ravencodess@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:18:22 +0100 Subject: [PATCH 7/9] Delete .github/workflows/phoenix-deployment.yml Signed-off-by: Ravencodess <115118888+Ravencodess@users.noreply.github.com> --- .github/workflows/phoenix-deployment.yml | 54 ------------------------ 1 file changed, 54 deletions(-) delete mode 100644 .github/workflows/phoenix-deployment.yml diff --git a/.github/workflows/phoenix-deployment.yml b/.github/workflows/phoenix-deployment.yml deleted file mode 100644 index cea68e081..000000000 --- a/.github/workflows/phoenix-deployment.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Pheonix Deployment - -on: - workflow_dispatch: - # workflow_run: - # workflows: ["Build and Upload"] - # types: - # - completed - -jobs: - deploy: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - environment: - name: "panther-expressjs" - url: ${{ vars.URL }} - - steps: - - name: Download build artifact - uses: actions/download-artifact@v4 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ github.event.workflow_run.id }} - name: boilerplate-build - path: . - - - name: Decode ENV secret - run: | - echo "${{ secrets.ENV }}" > encoded_env.txt - base64 -d encoded_env.txt > .env.expressjs - - - name: Copy Artifacts to server - uses: appleboy/scp-action@v0.1.7 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - source: ".env.expressjs,boilerplate.tar.gz" - target: "/tmp/expressjs" - - - name: Deploy on server - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd hng_boilerplate_nextjs - tar -xzf /tmp/expressjs/boilerplate.tar.gz - mv /tmp/expressjs/.env.expressjs .env - rm -f /tmp/expressjs/boilerplate.tar.gz - cp -r .next/standalone/* . - pm2 restart nextjs_boilerplate --update-env From 85f664ec7c1ef9fe1b2434e4ff52ee08b2b4d909 Mon Sep 17 00:00:00 2001 From: Ravencodess <115118888+Ravencodess@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:18:34 +0100 Subject: [PATCH 8/9] Delete .github/workflows/starlight-deploy.yml Signed-off-by: Ravencodess <115118888+Ravencodess@users.noreply.github.com> --- .github/workflows/starlight-deploy.yml | 51 -------------------------- 1 file changed, 51 deletions(-) delete mode 100644 .github/workflows/starlight-deploy.yml diff --git a/.github/workflows/starlight-deploy.yml b/.github/workflows/starlight-deploy.yml deleted file mode 100644 index 8a586098f..000000000 --- a/.github/workflows/starlight-deploy.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Starlight Deployment - -on: - workflow_dispatch: - # workflow_run: - # workflows: ["Build and Upload"] - # types: - # - completed - -jobs: - deploy_to_nestsjs: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - environment: - name: "starlight-nestjs" - url: ${{ vars.URL }} - - steps: - - name: Download build artifact - uses: actions/download-artifact@v4 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ github.event.workflow_run.id }} - name: boilerplate-build - path: . - - - name: Decode and create .env file - run: | - echo ${{ secrets.ENV }} | base64 -d > .env.nestsjs - - - name: Copy Artifacts to server - run: | - sudo apt update && sudo apt install sshpass -y - sshpass -p ${{ secrets.PASSWORD }} scp -o StrictHostKeyChecking=no boilerplate.tar.gz .env.nestsjs ${{ secrets.USERNAME }}@${{ secrets.HOST }}:/tmp/nestsjs - rm -f boilerplate.tar.gz .env.nestsjs - - - name: Deploy on server - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd /home/bingofe/boilerplate - rm -rf * - tar -xzf /tmp/nestsjs/boilerplate.tar.gz - mv /tmp/nestsjs/.env.nestsjs .env - rm -f /tmp/nestsjs/boilerplate.tar.gz - cp -r .next/standalone/* . - pm2 restart nestsjs-boilerplate --update-env From 60f2adba8593841b8d263cc846b6f6f21e5b233c Mon Sep 17 00:00:00 2001 From: Ravencodess <115118888+Ravencodess@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:18:56 +0100 Subject: [PATCH 9/9] Delete .github/workflows/team-deployment.yml Signed-off-by: Ravencodess <115118888+Ravencodess@users.noreply.github.com> --- .github/workflows/team-deployment.yml | 142 -------------------------- 1 file changed, 142 deletions(-) delete mode 100644 .github/workflows/team-deployment.yml diff --git a/.github/workflows/team-deployment.yml b/.github/workflows/team-deployment.yml deleted file mode 100644 index 1eed13552..000000000 --- a/.github/workflows/team-deployment.yml +++ /dev/null @@ -1,142 +0,0 @@ -name: Team Deployment - -on: - workflow_dispatch: - # workflow_run: - # workflows: ["Build and Upload"] - # types: - # - completed - -jobs: - kimiko-golang: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - environment: - name: "kimiko-golang" - url: ${{ vars.URL }} - - steps: - - name: Deploy to kimiko-golang environment - uses: appleboy/ssh-action@v1.0.3 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd hng_boilerplate_nextjs - ./scripts/team_deploy.sh kimiko-golang ${{ vars.PORT }} - - kimiko-csharp: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - environment: - name: "kimiko-csharp" - url: ${{ vars.URL }} - - steps: - - name: Deploy to kimiko-csharp environment - uses: appleboy/ssh-action@v1.0.3 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd hng_boilerplate_nextjs - ./scripts/team_deploy.sh kimiko-csharp ${{ vars.PORT }} - - anchor-java: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - environment: - name: "anchor-java" - url: ${{ vars.URL }} - - steps: - - name: Deploy to anchor-java environment - uses: appleboy/ssh-action@v1.0.3 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd hng_boilerplate_nextjs - ./scripts/team_deploy.sh anchor-java ${{ vars.PORT }} - - anchor-python: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - environment: - name: "anchor-python" - url: ${{ vars.URL }} - - steps: - - name: Deploy to anchor-python environment - uses: appleboy/ssh-action@v1.0.3 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd hng_boilerplate_nextjs - ./scripts/team_deploy.sh anchor-python ${{ vars.PORT }} - - bulldozer-php: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - environment: - name: "bulldozer-php" - url: ${{ vars.URL }} - - steps: - - name: Deploy to bulldozer-php environment - uses: appleboy/ssh-action@v1.0.3 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd hng_boilerplate_nextjs - ./scripts/team_deploy.sh bulldozer-php ${{ vars.PORT }} - - starlight-nestjs: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - environment: - name: "starlight-nestjs" - url: ${{ vars.URL }} - - steps: - - name: Deploy to starlight-nestjs environment - uses: appleboy/ssh-action@v1.0.3 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd hng_boilerplate_nextjs - ./scripts/team_deploy.sh starlight-nestjs ${{ vars.PORT }} - - panther-expressjs: - if: ${{ github.event.workflow_run.conclusion == 'success' }} - runs-on: ubuntu-latest - - environment: - name: "panther-expressjs" - url: ${{ vars.URL }} - - steps: - - name: Deploy to panther-expressjs environment - uses: appleboy/ssh-action@v1.0.3 - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - script: | - cd hng_boilerplate_nextjs - ./scripts/team_deploy.sh panther-expressjs ${{ vars.PORT }}