diff --git a/.github/workflows/tinytorch-publish-dev.yml b/.github/workflows/tinytorch-publish-dev.yml index dc8106035..186737b18 100644 --- a/.github/workflows/tinytorch-publish-dev.yml +++ b/.github/workflows/tinytorch-publish-dev.yml @@ -1,44 +1,37 @@ name: 🔥 TinyTorch Publish (Dev) # Builds and deploys TinyTorch site to dev preview -# Runs preflight checks, builds PDFs, then builds and deploys site +# Triggers after Validate (Dev) passes, builds PDFs, then deploys on: - push: - branches: [dev] - paths: - - 'tinytorch/site/**' - - 'tinytorch/src/**' - - 'tinytorch/paper/**' - - '.github/workflows/tinytorch-publish-dev.yml' - - '.github/workflows/tinytorch-build-pdfs.yml' workflow_dispatch: - -permissions: - contents: read - actions: read + workflow_run: + workflows: ["🔥 TinyTorch Validate (Dev)"] + types: [completed] + branches: [dev] concurrency: group: tinytorch-dev-deploy cancel-in-progress: true jobs: - preflight: - name: '✈️ Preflight Checks' - uses: ./.github/workflows/tinytorch-ci.yml - with: - preflight_level: 'quick' - + # Build PDFs (only if CI passed or manual trigger) build-pdfs: name: '📚 Build PDFs' - needs: [preflight] + if: (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'dev') || github.event_name == 'workflow_dispatch' uses: ./.github/workflows/tinytorch-build-pdfs.yml + # Build and deploy (after PDFs complete - deploys even if PDFs fail) build-and-deploy: name: '🔥 Build & Deploy TinyTorch Dev' runs-on: ubuntu-latest - needs: [preflight, build-pdfs] - if: always() && needs.preflight.result == 'success' + needs: [build-pdfs] + if: | + always() && + ((github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'dev') || github.event_name == 'workflow_dispatch') + permissions: + contents: read + actions: read steps: - name: 📥 Checkout diff --git a/.github/workflows/tinytorch-ci.yml b/.github/workflows/tinytorch-validate-dev.yml similarity index 99% rename from .github/workflows/tinytorch-ci.yml rename to .github/workflows/tinytorch-validate-dev.yml index 0b8fb68d6..1752d0ae5 100644 --- a/.github/workflows/tinytorch-ci.yml +++ b/.github/workflows/tinytorch-validate-dev.yml @@ -1,7 +1,7 @@ -name: 🔥 TinyTorch CI +name: 🔥 TinyTorch Validate (Dev) # ============================================================================= -# TinyTorch CI - Comprehensive Testing Workflow +# TinyTorch Validate (Dev) - Comprehensive Testing Workflow # ============================================================================= # # Test Progression (sequential, fail-fast):