diff --git a/.github/workflows/deploy-backoffice.yml b/.github/workflows/deploy-backoffice.yml new file mode 100644 index 0000000..4c2f433 --- /dev/null +++ b/.github/workflows/deploy-backoffice.yml @@ -0,0 +1,35 @@ +name: Deploy Backoffice + +on: + push: + branches: + - develop + paths: + - 'apps/backoffice/**' # INI BASED ON PATH CHANGES JADI NTAR KALAU ADA PUSH DIISNI OTOMATIS DEPLOY + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Deploy via SSH + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_KEY }} + port: ${{ secrets.SSH_PORT }} + script: | + set -e + if [ ! -d ~/imphnen-frontend-service-backoffice ]; then + git clone https://github.com/IMPHNEN/imphnen-frontend-service.git ~/imphnen-frontend-service-backoffice + else + cd ~/imphnen-frontend-service-backoffice && git pull + fi + echo "VITE_API_URL=${{ secrets.VITE_API_URL }}" > ~/imphnen-frontend-service-backoffice/apps/backoffice/.env + docker compose -f ~/imphnen-frontend-service-backoffice/docker-compose-backoffice.yml down || true + docker compose -f ~/imphnen-frontend-service-backoffice/docker-compose-backoffice.yml build + docker compose -f ~/imphnen-frontend-service-backoffice/docker-compose-backoffice.yml up -d + docker image prune -af diff --git a/.github/workflows/deploy-dimentorin.yml b/.github/workflows/deploy-dimentorin.yml new file mode 100644 index 0000000..543f990 --- /dev/null +++ b/.github/workflows/deploy-dimentorin.yml @@ -0,0 +1,35 @@ +name: Deploy Dimentorin + +on: + push: + branches: + - develop + paths: + - 'apps/dimentorin/**' # INI BASED ON PATH CHANGES JADI NTAR KALAU ADA PUSH DIISNI OTOMATIS DEPLOY + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Deploy via SSH + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_KEY }} + port: ${{ secrets.SSH_PORT }} + script: | + set -e + if [ ! -d ~/imphnen-frontend-service-dimentorin ]; then + git clone https://github.com/IMPHNEN/imphnen-frontend-service.git ~/imphnen-frontend-service-dimentorin + else + cd ~/imphnen-frontend-service-dimentorin && git pull + fi + echo "VITE_API_URL=${{ secrets.VITE_API_URL }}" > ~/imphnen-frontend-service-dimentorin/apps/dimentorin/.env + docker compose -f ~/imphnen-frontend-service-dimentorin/docker-compose-dimentorin.yml down || true + docker compose -f ~/imphnen-frontend-service-dimentorin/docker-compose-dimentorin.yml build + docker compose -f ~/imphnen-frontend-service-dimentorin/docker-compose-dimentorin.yml up -d + docker image prune -af diff --git a/.github/workflows/deploy-gacha.yml b/.github/workflows/deploy-gacha.yml new file mode 100644 index 0000000..86c347d --- /dev/null +++ b/.github/workflows/deploy-gacha.yml @@ -0,0 +1,35 @@ +name: Deploy Gacha + +on: + push: + branches: + - develop + paths: + - 'apps/gacha/**' # INI BASED ON PATH CHANGES JADI NTAR KALAU ADA PUSH DIISNI OTOMATIS DEPLOY + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Deploy via SSH + uses: appleboy/ssh-action@v1.0.3 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_KEY }} + port: ${{ secrets.SSH_PORT }} + script: | + set -e + if [ ! -d ~/imphnen-frontend-service-gacha ]; then + git clone https://github.com/IMPHNEN/imphnen-frontend-service.git ~/imphnen-frontend-service-gacha + else + cd ~/imphnen-frontend-service-gacha && git pull + fi + echo "VITE_API_URL=${{ secrets.VITE_API_URL }}" > ~/imphnen-frontend-service-gacha/apps/gacha/.env + docker compose -f ~/imphnen-frontend-service-gacha/docker-compose-gacha.yml down || true + docker compose -f ~/imphnen-frontend-service-gacha/docker-compose-gacha.yml build + docker compose -f ~/imphnen-frontend-service-gacha/docker-compose-gacha.yml up -d + docker image prune -af diff --git a/.github/workflows/deploy-landing.yml b/.github/workflows/deploy-landing.yml index ce85078..89cd15a 100644 --- a/.github/workflows/deploy-landing.yml +++ b/.github/workflows/deploy-landing.yml @@ -2,6 +2,8 @@ name: Deploy Landing on: push: + branches: + - develop paths: - 'apps/landing/**' # INI BASED ON PATH CHANGES JADI NTAR KALAU ADA PUSH DIISNI OTOMATIS DEPLOY diff --git a/docker-compose-backoffice.yml b/docker-compose-backoffice.yml new file mode 100644 index 0000000..4da19f9 --- /dev/null +++ b/docker-compose-backoffice.yml @@ -0,0 +1,10 @@ +version: '3.8' +services: + backoffice: + build: + context: . + dockerfile: docker/backoffice.Dockerfile + ports: + - "3001:80" + restart: unless-stopped + container_name: backoffice diff --git a/docker-compose-dimentorin.yml b/docker-compose-dimentorin.yml new file mode 100644 index 0000000..049c32a --- /dev/null +++ b/docker-compose-dimentorin.yml @@ -0,0 +1,10 @@ +version: '3.8' +services: + dimentorin: + build: + context: . + dockerfile: docker/dimentorin.Dockerfile + ports: + - "3002:80" + restart: unless-stopped + container_name: dimentorin diff --git a/docker-compose-gacha.yml b/docker-compose-gacha.yml new file mode 100644 index 0000000..6bec329 --- /dev/null +++ b/docker-compose-gacha.yml @@ -0,0 +1,10 @@ +version: '3.8' +services: + gacha: + build: + context: . + dockerfile: docker/gacha.Dockerfile + ports: + - "3003:80" + restart: unless-stopped + container_name: gacha