From 6101d911b3100d266a6c061e88e42962275f7e00 Mon Sep 17 00:00:00 2001 From: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Date: Thu, 18 Jun 2026 11:53:44 +0200 Subject: [PATCH] ci: activate PRD auto-deploy, remove legacy Azure pipeline (#3920) --- .github/workflows/api-prd.yaml | 64 ------------------------------ .github/workflows/dfx-api-prd.yaml | 13 +++++- 2 files changed, 11 insertions(+), 66 deletions(-) delete mode 100644 .github/workflows/api-prd.yaml diff --git a/.github/workflows/api-prd.yaml b/.github/workflows/api-prd.yaml deleted file mode 100644 index 3b151ee017..0000000000 --- a/.github/workflows/api-prd.yaml +++ /dev/null @@ -1,64 +0,0 @@ -# Legacy Azure deploy — will be removed after DFX server migration cutover. -# New deploy pipeline: dfx-api-prd.yaml (Docker + SSH to dfxprd). -name: API PRD CI/CD - -on: - push: - branches: [main] - workflow_dispatch: - -permissions: - contents: read - -env: - AZURE_WEBAPP_NAME: app-dfx-api-prd - AZURE_WEBAPP_PACKAGE_PATH: '.' - NODE_VERSION: '20.x' - -jobs: - build-and-deploy: - name: Build, test and deploy to PRD - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v5 - - - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@v5 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'npm' - - - name: Install packages - uses: nick-fields/retry@v4 - with: - timeout_minutes: 10 - max_attempts: 3 - retry_on: error - command: npm ci - - - name: Run linter - run: npm run lint - - - name: Format check - run: npm run format:check - - - name: Build code - run: npm run build - - - name: Run tests - run: npm run test - - - name: Security audit - run: npm audit --audit-level=high - continue-on-error: true - - - name: Write version file - run: echo "${{ github.sha }}" > dist/version.txt - - - name: Deploy to Azure App Service (PRD) - uses: azure/webapps-deploy@v3 - with: - app-name: ${{ env.AZURE_WEBAPP_NAME }} - publish-profile: ${{ secrets.PRD_PUBLISH_PROFILE }} - package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} diff --git a/.github/workflows/dfx-api-prd.yaml b/.github/workflows/dfx-api-prd.yaml index 660fc72bf8..75df76e80a 100644 --- a/.github/workflows/dfx-api-prd.yaml +++ b/.github/workflows/dfx-api-prd.yaml @@ -1,8 +1,17 @@ name: DFX API PRD CI/CD on: - # Auto-deploy re-enabled for DEV (dfxdev prerequisites are in place). - # PRD trigger stays disabled until the PRD cutover is complete. + # Auto-deploy on main-branch merges. Builds the linux/arm64 image, pushes + # dfxswiss/dfx-api:latest to Docker Hub, then SSHs to dfxprd (via the + # Cloudflare Access tunnel) and runs the deploy hook. Paths-ignore mirrors + # dfx-api-dev.yaml so docs/infrastructure-only changes don't trigger a + # full build+deploy. + push: + branches: [main] + paths-ignore: + - '**.md' + - 'infrastructure/**' + # Manual escape hatch (e.g. rebuild :latest without a code change). workflow_dispatch: env: