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 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 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 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 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 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 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 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 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 }}