Skip to content

Commit c47c899

Browse files
[ENHANCEMENT / BUGFIX] CI: publish version docs on tag creation (#5092)
This PR reviews the specific tag version deployment and deploys (and pushes) versions when a tag in the format vX.Y.Z is pushed. - The `--push` option was missing in the previous version - The version deployed will keep only the minor version. That means tags for a patch version `v2.1.3` will deploy the docs `v2.1` **Type of change** <!-- Please delete options that are not relevant. Remember to title the PR according to the type of change --> - Bug fix (non-breaking change which fixes an issue) - Improvement (change adding some improvement to an existing functionality) - Documentation update **How Has This Been Tested** <!-- Please add some reference about how your feature has been tested. --> **Checklist** <!-- Please go over the list and make sure you've taken everything into account --> - I added relevant documentation - follows the style guidelines of this project - I did a self-review of my code - I made corresponding changes to the documentation - I confirm My changes generate no new warnings - I have added tests that prove my fix is effective or that my feature works - I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/) --------- Co-authored-by: David Berenstein <[email protected]>
1 parent 3e9c804 commit c47c899

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/argilla.docs.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
push:
1111
tags:
12-
- "v*"
12+
- "v[2-9]+.[0-9]+.[0-9]+"
1313
branches:
1414
- "main"
1515
- "develop"
@@ -65,9 +65,14 @@ jobs:
6565
run: pdm run mike deploy dev --push
6666
if: github.ref == 'refs/heads/develop'
6767

68-
- name: Deploy Argilla docs (release vX.Y.Z)
69-
run: pdm run mike deploy ${{ github.ref_name }}
68+
- name: Deploy Argilla docs (release $version)
69+
run: |
70+
version=$(echo $TAG_VERSION | awk -F \. {'print $1"."$2'})
71+
echo "Deploying version ${version}"
72+
pdm run mike deploy $version --push
7073
if: startsWith(github.ref, 'refs/tags/')
74+
env:
75+
TAG_VERSION: ${{ github.ref_name }}
7176

7277
- name: Delete Argilla docs (versions 'docs_*')
7378
id: delete_deployment
@@ -97,4 +102,3 @@ jobs:
97102
with:
98103
message: |
99104
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 }})
100-

0 commit comments

Comments
 (0)