From 3560336c19fd8af8c65cdedaa36e172d69191c41 Mon Sep 17 00:00:00 2001 From: Tim Paine <3105306+timkpaine@users.noreply.github.com> Date: Fri, 10 Apr 2026 11:28:55 -0400 Subject: [PATCH] Rely on artifacts from build in docs --- ...% if add_docs %}docs.yaml{% endif %}.jinja | 35 ++++++++++++++--- ...% if add_docs %}docs.yaml{% endif %}.jinja | 39 +++++++++++++++---- ...% if add_docs %}docs.yaml{% endif %}.jinja | 36 ++++++++++++++--- ...% if add_docs %}docs.yaml{% endif %}.jinja | 36 ++++++++++++++--- ...% if add_docs %}docs.yaml{% endif %}.jinja | 35 ++++++++++++++--- ...% if add_docs %}docs.yaml{% endif %}.jinja | 36 ++++++++++++++--- ...% if add_docs %}docs.yaml{% endif %}.jinja | 39 +++++++++++++++---- 7 files changed, 212 insertions(+), 44 deletions(-) diff --git a/cpp/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja b/cpp/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja index 793c889..2437a66 100644 --- a/cpp/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja +++ b/cpp/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja @@ -1,21 +1,46 @@ name: Publish Docs on: - push: - branches: - - main + workflow_run: + workflows: ["Build Status"] + branches: [main] + types: [completed] workflow_dispatch: + permissions: + actions: read contents: write + jobs: docs: runs-on: ubuntu-latest + if: {% raw %}${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}{% endraw %} steps: - uses: actions/checkout@v6 - uses: actions-ext/python/setup@main - - run: uv pip install .[develop] - - run: uv pip install yardang + + - name: Download dist from build + uses: actions/download-artifact@v7 + with: + name: dist-ubuntu-latest-{{python_version_primary}} + path: dist + run-id: {% raw %}${{ github.event.workflow_run.id }}{% endraw %} + if: github.event_name == 'workflow_run' + + - name: Install from wheel + run: | + uv pip install dist/*.whl + uv pip install yardang + if: github.event_name == 'workflow_run' + + - name: Install from source (manual trigger) + run: | + uv pip install .[develop] + uv pip install yardang + if: github.event_name == 'workflow_dispatch' + - run: yardang build + - uses: peaceiris/actions-gh-pages@v4 with: publish_branch: gh-pages diff --git a/cppjswasm/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja b/cppjswasm/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja index 3b6770b..f9af542 100644 --- a/cppjswasm/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja +++ b/cppjswasm/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja @@ -1,24 +1,47 @@ name: Publish Docs on: - push: - branches: - - main + workflow_run: + workflows: ["Build Status"] + branches: [main] + types: [completed] workflow_dispatch: + permissions: + actions: read contents: write + jobs: docs: runs-on: ubuntu-latest + if: {% raw %}${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}{% endraw %} steps: - uses: actions/checkout@v6 - uses: actions-ext/python/setup@main - - uses: actions-ext/node/setup@main - - uses: mymindstorm/setup-emsdk@v16 - - run: make develop - - run: uv pip install . - - run: uv pip install yardang + + - name: Download dist from build + uses: actions/download-artifact@v7 + with: + name: dist-ubuntu-latest-{{python_version_primary}} + path: dist + run-id: {% raw %}${{ github.event.workflow_run.id }}{% endraw %} + if: github.event_name == 'workflow_run' + + - name: Install from wheel + run: | + uv pip install dist/*.whl + uv pip install yardang + if: github.event_name == 'workflow_run' + + - name: Install from source (manual trigger) + run: | + make develop + uv pip install . + uv pip install yardang + if: github.event_name == 'workflow_dispatch' + - run: yardang build + - uses: peaceiris/actions-gh-pages@v4 with: publish_branch: gh-pages diff --git a/js/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja b/js/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja index 7a54c47..7abbb20 100644 --- a/js/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja +++ b/js/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja @@ -1,22 +1,46 @@ name: Publish Docs on: - push: - branches: - - main + workflow_run: + workflows: ["Build Status"] + branches: [main] + types: [completed] workflow_dispatch: + permissions: + actions: read contents: write + jobs: docs: runs-on: ubuntu-latest + if: {% raw %}${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}{% endraw %} steps: - uses: actions/checkout@v6 - uses: actions-ext/python/setup@main - - uses: actions-ext/node/setup@main - - run: uv pip install .[develop] - - run: uv pip install yardang + + - name: Download dist from build + uses: actions/download-artifact@v7 + with: + name: dist-ubuntu-latest + path: dist + run-id: {% raw %}${{ github.event.workflow_run.id }}{% endraw %} + if: github.event_name == 'workflow_run' + + - name: Install from wheel + run: | + uv pip install dist/*.whl + uv pip install yardang + if: github.event_name == 'workflow_run' + + - name: Install from source (manual trigger) + run: | + uv pip install .[develop] + uv pip install yardang + if: github.event_name == 'workflow_dispatch' + - run: yardang build + - uses: peaceiris/actions-gh-pages@v4 with: publish_branch: gh-pages diff --git a/jupyter/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja b/jupyter/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja index 7a54c47..7abbb20 100644 --- a/jupyter/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja +++ b/jupyter/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja @@ -1,22 +1,46 @@ name: Publish Docs on: - push: - branches: - - main + workflow_run: + workflows: ["Build Status"] + branches: [main] + types: [completed] workflow_dispatch: + permissions: + actions: read contents: write + jobs: docs: runs-on: ubuntu-latest + if: {% raw %}${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}{% endraw %} steps: - uses: actions/checkout@v6 - uses: actions-ext/python/setup@main - - uses: actions-ext/node/setup@main - - run: uv pip install .[develop] - - run: uv pip install yardang + + - name: Download dist from build + uses: actions/download-artifact@v7 + with: + name: dist-ubuntu-latest + path: dist + run-id: {% raw %}${{ github.event.workflow_run.id }}{% endraw %} + if: github.event_name == 'workflow_run' + + - name: Install from wheel + run: | + uv pip install dist/*.whl + uv pip install yardang + if: github.event_name == 'workflow_run' + + - name: Install from source (manual trigger) + run: | + uv pip install .[develop] + uv pip install yardang + if: github.event_name == 'workflow_dispatch' + - run: yardang build + - uses: peaceiris/actions-gh-pages@v4 with: publish_branch: gh-pages diff --git a/python/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja b/python/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja index 793c889..7abbb20 100644 --- a/python/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja +++ b/python/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja @@ -1,21 +1,46 @@ name: Publish Docs on: - push: - branches: - - main + workflow_run: + workflows: ["Build Status"] + branches: [main] + types: [completed] workflow_dispatch: + permissions: + actions: read contents: write + jobs: docs: runs-on: ubuntu-latest + if: {% raw %}${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}{% endraw %} steps: - uses: actions/checkout@v6 - uses: actions-ext/python/setup@main - - run: uv pip install .[develop] - - run: uv pip install yardang + + - name: Download dist from build + uses: actions/download-artifact@v7 + with: + name: dist-ubuntu-latest + path: dist + run-id: {% raw %}${{ github.event.workflow_run.id }}{% endraw %} + if: github.event_name == 'workflow_run' + + - name: Install from wheel + run: | + uv pip install dist/*.whl + uv pip install yardang + if: github.event_name == 'workflow_run' + + - name: Install from source (manual trigger) + run: | + uv pip install .[develop] + uv pip install yardang + if: github.event_name == 'workflow_dispatch' + - run: yardang build + - uses: peaceiris/actions-gh-pages@v4 with: publish_branch: gh-pages diff --git a/rust/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja b/rust/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja index 03aae51..7abbb20 100644 --- a/rust/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja +++ b/rust/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja @@ -1,22 +1,46 @@ name: Publish Docs on: - push: - branches: - - main + workflow_run: + workflows: ["Build Status"] + branches: [main] + types: [completed] workflow_dispatch: + permissions: + actions: read contents: write + jobs: docs: runs-on: ubuntu-latest + if: {% raw %}${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}{% endraw %} steps: - uses: actions/checkout@v6 - uses: actions-ext/python/setup@main - - uses: actions-ext/rust/setup@main - - run: uv pip install .[develop] - - run: uv pip install yardang + + - name: Download dist from build + uses: actions/download-artifact@v7 + with: + name: dist-ubuntu-latest + path: dist + run-id: {% raw %}${{ github.event.workflow_run.id }}{% endraw %} + if: github.event_name == 'workflow_run' + + - name: Install from wheel + run: | + uv pip install dist/*.whl + uv pip install yardang + if: github.event_name == 'workflow_run' + + - name: Install from source (manual trigger) + run: | + uv pip install .[develop] + uv pip install yardang + if: github.event_name == 'workflow_dispatch' + - run: yardang build + - uses: peaceiris/actions-gh-pages@v4 with: publish_branch: gh-pages diff --git a/rustjswasm/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja b/rustjswasm/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja index c102e47..22effd5 100644 --- a/rustjswasm/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja +++ b/rustjswasm/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja @@ -1,24 +1,47 @@ name: Publish Docs on: - push: - branches: - - main + workflow_run: + workflows: ["Build Status"] + branches: [main] + types: [completed] workflow_dispatch: + permissions: + actions: read contents: write + jobs: docs: runs-on: ubuntu-latest + if: {% raw %}${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}{% endraw %} steps: - uses: actions/checkout@v6 - uses: actions-ext/python/setup@main - - uses: actions-ext/rust/setup@main - - uses: actions-ext/node/setup@main - - run: make develop - - run: uv pip install . - - run: uv pip install yardang + + - name: Download dist from build + uses: actions/download-artifact@v7 + with: + name: dist-ubuntu-latest + path: dist + run-id: {% raw %}${{ github.event.workflow_run.id }}{% endraw %} + if: github.event_name == 'workflow_run' + + - name: Install from wheel + run: | + uv pip install dist/*.whl + uv pip install yardang + if: github.event_name == 'workflow_run' + + - name: Install from source (manual trigger) + run: | + make develop + uv pip install . + uv pip install yardang + if: github.event_name == 'workflow_dispatch' + - run: yardang build + - uses: peaceiris/actions-gh-pages@v4 with: publish_branch: gh-pages