diff --git a/.github/workflows/argilla-server.yml b/.github/workflows/argilla-server.yml index 769410d425..89b1592097 100644 --- a/.github/workflows/argilla-server.yml +++ b/.github/workflows/argilla-server.yml @@ -8,8 +8,14 @@ on: workflow_dispatch: push: + branches: + - main + - develop + - releases/** pull_request: + paths: + - "argilla-server/**" jobs: build: @@ -109,6 +115,7 @@ jobs: if: | github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' + || contains(github.ref, 'releases/') || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' needs: diff --git a/.github/workflows/argilla-v1.yml b/.github/workflows/argilla-v1.yml index 475f1bb2e4..1043347e46 100644 --- a/.github/workflows/argilla-v1.yml +++ b/.github/workflows/argilla-v1.yml @@ -8,6 +8,14 @@ on: workflow_dispatch: push: + branches: + - main + - develop + - releases/** + + pull_request: + paths: + - "argilla-v1/**" jobs: build: diff --git a/.github/workflows/argilla.docs.yml b/.github/workflows/argilla.docs.yml index 4c59027f5a..d04626c2c6 100644 --- a/.github/workflows/argilla.docs.yml +++ b/.github/workflows/argilla.docs.yml @@ -9,10 +9,11 @@ on: push: tags: - - "v*" + - "v[2-9]+.[0-9]+.[0-9]+" branches: - "main" - "develop" + - "docs/**" defaults: run: @@ -54,13 +55,50 @@ jobs: run: echo "${{ github.ref }}" echo "${{ github.head_ref }}" - - run: | + - name: Deploy Argilla docs (branch /main) + run: | pdm run mike deploy latest --push pdm run mike set-default --push latest if: github.ref == 'refs/heads/main' - - run: pdm run mike deploy dev --push + - name: Deploy Argilla docs (branch /develop) + run: pdm run mike deploy dev --push if: github.ref == 'refs/heads/develop' - - run: pdm run mike deploy ${{ github.ref_name }} + - name: Deploy Argilla docs (release $version) + run: | + version=$(echo $TAG_VERSION | awk -F \. {'print $1"."$2'}) + echo "Deploying version ${version}" + pdm run mike deploy $version --push + if: startsWith(github.ref, 'refs/tags/') + env: + TAG_VERSION: ${{ github.ref_name }} + + - name: Delete Argilla docs (versions 'docs_*') + id: delete_deployment + run: | + versions=$(pdm run mike list) + formatted_versions=$(echo "$versions" | tr ',' '\n' | tr -d '[]') + for version in $versions; do + if [[ $version == docs_* ]]; then + echo "Deleting version: $version" + pdm run mike delete "$version" --push + fi + done if: startsWith(github.ref, 'refs/tags/') + + - name: Extract branch name + id: extract_branch_name + shell: bash + run: echo "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" | sed 's/\//_/g' >> $GITHUB_OUTPUT + + - name: Deploy Argilla docs (branch /docs/*) + run: pdm run mike deploy ${{ steps.extract_branch_name.outputs.branch_name }} --prop-set hidden=true --push + if: startsWith(github.ref, 'refs/heads/docs') || startsWith(github.head_ref, 'docs/') + + - name: Add deployment message in PR + uses: mshick/add-pr-comment@v2 + if: startsWith(github.ref, 'refs/heads/docs') || startsWith(github.head_ref, 'docs/') + with: + message: | + Docs for this PR have been deployed hidden from versioning: [https://argilla-io.github.io/argilla/${{ steps.extract_branch_name.outputs.branch_name }}](https://argilla-io.github.io/argilla/${{ steps.extract_branch_name.outputs.branch_name }}) diff --git a/.github/workflows/argilla.yml b/.github/workflows/argilla.yml index c1de90e876..fea7e140bc 100644 --- a/.github/workflows/argilla.yml +++ b/.github/workflows/argilla.yml @@ -8,6 +8,14 @@ on: workflow_dispatch: push: + branches: + - main + - develop + - releases/** + + pull_request: + paths: + - "argilla/**" jobs: build: diff --git a/argilla-frontend/components/base/base-collpasable-panel/BaseCollapsablePanel.vue b/argilla-frontend/components/base/base-collpasable-panel/BaseCollapsablePanel.vue index 997a0390ca..574f66e5a3 100644 --- a/argilla-frontend/components/base/base-collpasable-panel/BaseCollapsablePanel.vue +++ b/argilla-frontend/components/base/base-collpasable-panel/BaseCollapsablePanel.vue @@ -1,5 +1,11 @@