From 189a15a46eb4635033e4b53cba49f8938042906b Mon Sep 17 00:00:00 2001 From: Steven Van Ingelgem Date: Mon, 2 Oct 2023 07:56:20 +0200 Subject: [PATCH] Restrict the steps to polars as the release ain't possible from anywhere else. --- .github/workflows/clear-caches.yml | 1 + .github/workflows/docs-global.yml | 2 +- .github/workflows/docs-python.yml | 6 +++--- .github/workflows/docs-rust.yml | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/clear-caches.yml b/.github/workflows/clear-caches.yml index fc75374b21fb..043b9fabf6d5 100644 --- a/.github/workflows/clear-caches.yml +++ b/.github/workflows/clear-caches.yml @@ -14,6 +14,7 @@ jobs: - uses: actions/checkout@v4 - name: Clear all caches + if: ${{ github.repository == 'pola-rs/polars' }} run: gh cache delete --all env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/docs-global.yml b/.github/workflows/docs-global.yml index 6e8f12bcae5e..8c60eda5ce77 100644 --- a/.github/workflows/docs-global.yml +++ b/.github/workflows/docs-global.yml @@ -77,7 +77,7 @@ jobs: run: touch .nojekyll - name: Deploy docs - if: ${{ github.ref_type == 'tag' }} + if: ${{ github.ref_type == 'tag' and github.repository == 'pola-rs/polars' }} uses: JamesIves/github-pages-deploy-action@v4 with: folder: site diff --git a/.github/workflows/docs-python.yml b/.github/workflows/docs-python.yml index 3cc0e96c36a7..b3421b2c0dd9 100644 --- a/.github/workflows/docs-python.yml +++ b/.github/workflows/docs-python.yml @@ -44,7 +44,7 @@ jobs: run: make html - name: Deploy Python docs for latest development version - if: ${{ github.ref_name == 'main' }} + if: ${{ github.ref_name == 'main' and github.repository == 'pola-rs/polars' }} uses: JamesIves/github-pages-deploy-action@v4 with: folder: py-polars/docs/build/html @@ -63,7 +63,7 @@ jobs: echo "version=$version" >> "$GITHUB_OUTPUT" - name: Deploy Python docs for latest release version - versioned - if: ${{ github.ref_type == 'tag' }} + if: ${{ github.ref_type == 'tag' and github.repository == 'pola-rs/polars' }} uses: JamesIves/github-pages-deploy-action@v4 with: folder: py-polars/docs/build/html @@ -71,7 +71,7 @@ jobs: single-commit: true - name: Deploy Python docs for latest release version - stable - if: ${{ github.ref_type == 'tag' }} + if: ${{ github.ref_type == 'tag' and github.repository == 'pola-rs/polars' }} uses: JamesIves/github-pages-deploy-action@v4 with: folder: py-polars/docs/build/html diff --git a/.github/workflows/docs-rust.yml b/.github/workflows/docs-rust.yml index cd02b16ef53d..a878c6cca9fa 100644 --- a/.github/workflows/docs-rust.yml +++ b/.github/workflows/docs-rust.yml @@ -42,7 +42,7 @@ jobs: touch target/doc/.nojekyll - name: Deploy Rust docs - if: ${{ github.ref_name == 'main' }} + if: ${{ github.ref_name == 'main' and github.repository == 'pola-rs/polars' }} uses: JamesIves/github-pages-deploy-action@v4 with: folder: target/doc