From d2b4dcc572fdd07f6e8034849f8286194f133873 Mon Sep 17 00:00:00 2001 From: "Ozzy (AI Assistant)" Date: Mon, 27 Jul 2026 18:34:06 +0000 Subject: [PATCH] Try enabling pages via gh api in workflow --- .github/workflows/pages.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 97e6aaa..e446dc3 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -3,7 +3,6 @@ name: Deploy to GitHub Pages on: push: branches: ["main"] - workflow_dispatch: permissions: @@ -24,14 +23,24 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup Pages - uses: actions/configure-pages@v5 - with: - enablement: true + + - name: Download gh + run: | + curl -sL "https://github.com/cli/cli/releases/download/v2.63.2/gh_2.63.2_linux_amd64.tar.gz" -o /tmp/gh.tar.gz + tar -xzf /tmp/gh.tar.gz -C /tmp/ + + - name: Enable Pages via API + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + /tmp/gh_2.63.2_linux_amd64/bin/gh api --method POST repos/${{ github.repository }}/pages \ + --field source[branch]=main --field source[path]='/' || echo "Create failed, trying update..." + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: '.' + - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4