diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 10b110f..870cf8e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,8 +9,6 @@ on: permissions: contents: read - pages: write - id-token: write concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} @@ -275,9 +273,12 @@ jobs: - name: Upload docs artifact (production, full render only) if: github.event_name == 'push' && github.ref == 'refs/heads/main' - uses: actions/upload-pages-artifact@v5 + uses: actions/upload-artifact@v7 with: + name: docs-html path: docs/_build/html + if-no-files-found: error + retention-days: 7 - name: Upload smoke-render artifact for PR review # Plain artifact, downloadable from the run page. NEVER a Pages @@ -311,23 +312,8 @@ jobs: run: uv run --group docs sphinx-build -b linkcheck -D nb_execution_mode=off docs docs/_build/linkcheck deploy-docs: - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - needs: [quality, tests-and-type-check, build-docs] - runs-on: ubuntu-latest - concurrency: - group: pages - cancel-in-progress: false - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - name: Deploy documentation - id: deployment - uses: actions/deploy-pages@v5 - - deploy-docs-cloudflare: - # Serves the same build from Cloudflare (docs/wrangler.jsonc). Runs next to - # the GitHub Pages deploy while the docs are staged on a second hostname. + # Cloudflare serves the docs as the static assets of the `impulso-docs` + # Worker (docs/wrangler.jsonc). The token lives only in this job. if: github.event_name == 'push' && github.ref == 'refs/heads/main' needs: [quality, tests-and-type-check, build-docs] runs-on: ubuntu-latest @@ -344,12 +330,8 @@ jobs: - name: Download the docs build uses: actions/download-artifact@v8 with: - name: github-pages - - - name: Unpack the docs build - run: | - mkdir -p docs/_build/html - tar -xf artifact.tar -C docs/_build/html + name: docs-html + path: docs/_build/html - name: Set up Node uses: actions/setup-node@v7 diff --git a/docs/wrangler.jsonc b/docs/wrangler.jsonc index 54efc13..bcad87a 100644 --- a/docs/wrangler.jsonc +++ b/docs/wrangler.jsonc @@ -1,6 +1,6 @@ // Cloudflare Workers configuration for the docs: the Sphinx HTML build is -// served as static assets, with no Worker code. The `deploy-docs-cloudflare` -// job in .github/workflows/main.yml deploys it on every push to main. +// served as static assets, with no Worker code. The `deploy-docs` job in +// .github/workflows/main.yml deploys it on every push to main. { "name": "impulso-docs", "compatibility_date": "2026-09-30", @@ -8,8 +8,7 @@ "workers_dev": false, "preview_urls": false, // Cloudflare creates the DNS record and certificate for this hostname. - // Staging hostname: GitHub Pages still serves impulso.quantclimate.com. - "routes": [{ "pattern": "impulso-next.quantclimate.com", "custom_domain": true }], + "routes": [{ "pattern": "impulso.quantclimate.com", "custom_domain": true }], "assets": { "directory": "./_build/html", // Serve every file at exactly the URL Sphinx gives it (/page.html stays