From 842deed35ff6241e0b36afe13c65edcf7b89d3e0 Mon Sep 17 00:00:00 2001 From: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Date: Tue, 26 May 2026 18:40:08 +0200 Subject: [PATCH] feat(deploy): migrate dev to Cloudflare Pages Replace FTP-Deploy-Action targeting All-Inkl with wrangler-based Direct Upload to Cloudflare Pages, matching the prd.yaml change from #128/#69/#34/ #16/#39/#45/#8. Pages project: dfx-docs-dev (production_branch=develop). Paired with a Terraform change in DFXServer/server that creates the project and switches the dev.* DNS record. --- .github/workflows/dev.yaml | 46 ++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index cf918b0..61159f8 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -1,38 +1,50 @@ -name: Deploy to All-Inkl +name: Deploy develop to Cloudflare Pages on: push: branches: [develop] workflow_dispatch: +permissions: + contents: read + deployments: write + +concurrency: + group: dev-deploy + cancel-in-progress: true + env: NODE_VERSION: '16.x' jobs: - build-and-deploy: - name: Build, and deploy to All-Inkl + deploy: + name: Build + wrangler pages deploy runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - name: Install packages - run: | - npm ci + run: npm ci - - name: Build code - run: | - npm run build + - name: Build + run: npm run build - - name: Deploy to All-Inkl - uses: SamKirkland/FTP-Deploy-Action@v4.3.4 - with: - server: ${{ secrets.DEV_HOST }} - username: ${{ secrets.DEV_USER }} - password: ${{ secrets.DEV_PASSWORD }} - local-dir: './src/.vuepress/dist/' + - name: Install Wrangler + run: npm install -g wrangler@4 + + - name: Deploy to Cloudflare Pages + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + run: | + wrangler pages deploy ./src/.vuepress/dist \ + --project-name=dfx-docs-dev \ + --branch=develop \ + --commit-hash=${{ github.sha }} \ + --commit-message="${{ github.event.head_commit.message }}"