haystack/.github/workflows/promote_unstable_docs.yml
Silvano Cerza 145dfce3aa
ci: Slightly rework docs release process (#8363)
* Slightly rework docs release process

* Apply suggestions from code review

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>

---------

Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
2024-09-16 09:28:40 +00:00

39 lines
1.0 KiB
YAML

name: Release new minor version docs
on:
push:
tags:
# Trigger this only for the first patch release of the new minor
- "v[0-9]+.[0-9]+.0"
# Exclude 1.x tags
- "!v1.[0-9]+.[0-9]+"
env:
PYTHON_VERSION: "3.8"
jobs:
promote:
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v4
- name: Get version to release
id: version
shell: bash
# We only need `major.minor` in Readme so we cut the full version string to the first two tokens
run: |
echo "version=$(cut -d "." -f 1,2 < VERSION.txt)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-python@v5
with:
python-version: "${{ env.PYTHON_VERSION }}"
- name: Install promote_unstable_docs.py dependencies
run: pip install requests
- name: Release Readme version
env:
RDME_API_KEY: ${{ secrets.README_API_KEY }}
run: |
python ./.github/utils/promote_unstable_docs.py --version ${{ steps.version.outputs.version }}