Route GeckoTerminal via pricing-proxy #54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: JUSD Monitoring DEV CI/CD | |
| on: | |
| push: | |
| branches: [develop] | |
| paths-ignore: | |
| - 'frontend/**' | |
| pull_request: | |
| branches: [develop] | |
| paths-ignore: | |
| - 'frontend/**' | |
| workflow_dispatch: | |
| inputs: | |
| reset_database: | |
| description: 'Reset Database (DESTRUCTIVE - drops all data)' | |
| required: false | |
| type: boolean | |
| default: false | |
| env: | |
| DOCKER_TAGS: juicedollarcom/monitoring:beta | |
| DEPLOY_SERVICE: jusd-monitoring | |
| jobs: | |
| build: | |
| name: Build and test Monitoring | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: false | |
| load: true | |
| tags: ${{ env.DOCKER_TAGS }} | |
| deploy: | |
| name: Deploy Monitoring to DEV | |
| runs-on: ubuntu-24.04-arm | |
| needs: build | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/develop' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| tags: ${{ env.DOCKER_TAGS }} | |
| platforms: linux/arm64 | |
| - name: Install cloudflared | |
| run: | | |
| curl -fsSL https://github.com/cloudflare/cloudflared/releases/download/2025.4.0/cloudflared-linux-arm64 -o /usr/local/bin/cloudflared | |
| chmod +x /usr/local/bin/cloudflared | |
| - name: Deploy to server | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "${{ secrets.DEPLOY_DEV_SSH_KEY }}" > ~/.ssh/deploy_key | |
| chmod 600 ~/.ssh/deploy_key | |
| echo "${{ secrets.DEPLOY_DEV_SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts | |
| ssh -i ~/.ssh/deploy_key \ | |
| -o ProxyCommand="cloudflared access ssh --hostname ${{ secrets.DEPLOY_DEV_HOST }}" \ | |
| ${{ secrets.DEPLOY_DEV_USER }}@${{ secrets.DEPLOY_DEV_HOST }} \ | |
| "${{ env.DEPLOY_SERVICE }}" | |
| reset-database: | |
| name: Reset Database | |
| runs-on: ubuntu-24.04-arm | |
| needs: deploy | |
| if: github.event_name == 'workflow_dispatch' && inputs.reset_database == true | |
| steps: | |
| - name: Install cloudflared | |
| run: | | |
| curl -fsSL https://github.com/cloudflare/cloudflared/releases/download/2025.4.0/cloudflared-linux-arm64 -o /usr/local/bin/cloudflared | |
| chmod +x /usr/local/bin/cloudflared | |
| - name: Reset monitoring database | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "${{ secrets.DEPLOY_DEV_SSH_KEY }}" > ~/.ssh/deploy_key | |
| chmod 600 ~/.ssh/deploy_key | |
| echo "${{ secrets.DEPLOY_DEV_SSH_KNOWN_HOSTS }}" > ~/.ssh/known_hosts | |
| ssh -i ~/.ssh/deploy_key \ | |
| -o ProxyCommand="cloudflared access ssh --hostname ${{ secrets.DEPLOY_DEV_HOST }}" \ | |
| ${{ secrets.DEPLOY_DEV_USER }}@${{ secrets.DEPLOY_DEV_HOST }} \ | |
| "reset-jusd-monitoring-db" |