From ee6ee8acfc4ff8ff9d76cf5ebbc112f578b23384 Mon Sep 17 00:00:00 2001 From: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Date: Tue, 26 May 2026 17:43:43 +0200 Subject: [PATCH 1/4] feat(deploy): migrate prd to Cloudflare Pages (#128) Replace FTP-Deploy-Action targeting All-Inkl with wrangler-based Direct Upload to Cloudflare Pages, matching the dfx-landing-page pattern in use since 2026-05-26. - Pages project: dfx-docs-prd (production_branch=main) - All-Inkl FTP secrets (PRD_HOST/USER/PASSWORD) can be removed once the cutover is validated. Paired with the Terraform change in DFXServer/server that creates the Pages project and switches the DNS record. --- .github/workflows/prd.yaml | 46 ++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/.github/workflows/prd.yaml b/.github/workflows/prd.yaml index 161a0af..813b66e 100644 --- a/.github/workflows/prd.yaml +++ b/.github/workflows/prd.yaml @@ -1,38 +1,50 @@ -name: Deploy to All-Inkl +name: Deploy main to Cloudflare Pages on: push: branches: [main] workflow_dispatch: +permissions: + contents: read + deployments: write + +concurrency: + group: prd-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.PRD_HOST }} - username: ${{ secrets.PRD_USER }} - password: ${{ secrets.PRD_PASSWORD }} - local-dir: './src/.vuepress/dist/' \ No newline at end of file + - 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-prd \ + --branch=main \ + --commit-hash=${{ github.sha }} \ + --commit-message="${{ github.event.head_commit.message }}" From 3302b844daedd814daacf67c4ef6911ccb5fa594 Mon Sep 17 00:00:00 2001 From: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Date: Tue, 26 May 2026 19:35:11 +0200 Subject: [PATCH 2/4] feat(deploy): migrate dev to Cloudflare Pages (#131) 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 }}" From 36e674d6e99b7d4465d9ffe53b1ded05677c1503 Mon Sep 17 00:00:00 2001 From: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Date: Tue, 26 May 2026 20:59:00 +0200 Subject: [PATCH 3/4] fix(deploy): use Node 22 for wrangler step (#132) Wrangler 4 requires Node 22+. The previous setup-node@v4 with NODE_VERSION='16.x' (for the VuePress build) was also used by the wrangler step, causing "Wrangler requires at least Node.js v22.0.0" failures. Add a second setup-node step right before wrangler installation, switching to Node 22. VuePress build still runs on Node 16 as before. --- .github/workflows/dev.yaml | 5 +++++ .github/workflows/prd.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index 61159f8..bfc5da5 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -35,6 +35,11 @@ jobs: - name: Build run: npm run build + - name: Use Node.js 22 (wrangler) + uses: actions/setup-node@v4 + with: + node-version: "22" + - name: Install Wrangler run: npm install -g wrangler@4 diff --git a/.github/workflows/prd.yaml b/.github/workflows/prd.yaml index 813b66e..7efe270 100644 --- a/.github/workflows/prd.yaml +++ b/.github/workflows/prd.yaml @@ -35,6 +35,11 @@ jobs: - name: Build run: npm run build + - name: Use Node.js 22 (wrangler) + uses: actions/setup-node@v4 + with: + node-version: "22" + - name: Install Wrangler run: npm install -g wrangler@4 From 7a740d85b0b316ed79b22be640aa528f4222f8ee Mon Sep 17 00:00:00 2001 From: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Date: Tue, 26 May 2026 21:55:06 +0200 Subject: [PATCH 4/4] fix(deploy): pass commit message via env var for multi-line safety (#133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub Actions expansion of multi-line strings into a shell argument like --commit-message="${{ github.event.head_commit.message }}" splits on newlines and wrangler reads the trailing lines as positional arguments ("Unknown arguments: …"). Pass the message via an env var instead. --- .github/workflows/dev.yaml | 3 ++- .github/workflows/prd.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index bfc5da5..c2f49ac 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -47,9 +47,10 @@ jobs: env: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + COMMIT_MSG: ${{ github.event.head_commit.message }} 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 }}" + --commit-message="$COMMIT_MSG" diff --git a/.github/workflows/prd.yaml b/.github/workflows/prd.yaml index 7efe270..9bf0d2c 100644 --- a/.github/workflows/prd.yaml +++ b/.github/workflows/prd.yaml @@ -47,9 +47,10 @@ jobs: env: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + COMMIT_MSG: ${{ github.event.head_commit.message }} run: | wrangler pages deploy ./src/.vuepress/dist \ --project-name=dfx-docs-prd \ --branch=main \ --commit-hash=${{ github.sha }} \ - --commit-message="${{ github.event.head_commit.message }}" + --commit-message="$COMMIT_MSG"