docs: 4920 v1 docs add banner with link to the new docs post refactor… #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish documentation | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
paths: | |
- "argilla/docs/**" | |
- "argilla/src/**" | |
branches: | |
# - "main" | |
# - "develop" | |
- "feat/v2.0.0" # Fixing this branch until we merge everything into develop | |
- "docs/**" # When we create a new branch only for docs | |
tags: | |
- "*" | |
defaults: | |
run: | |
working-directory: argilla | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- name: checkout docs-site | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: true | |
cache-dependency-path: | | |
argilla/pyproject.toml | |
- name: Install dependencies | |
run: | | |
pdm install | |
- name: Set git credentials | |
run: | | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
- name: Print GitHub ref info | |
run: | |
echo "${{ github.ref }}" | |
echo "${{ github.head_ref }}" | |
- run: pdm run mike deploy dev --push | |
if: github.ref == 'refs/heads/feat/v2.0.0' | |
# if: github.ref == 'refs/heads/develop' | |
env: | |
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
- run: pdm run mike deploy ${{ github.ref_name }} latest --update-aliases --push | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" | sed 's/\//_/g' >> $GITHUB_OUTPUT | |
id: extract_branch_name | |
- run: pdm run mike deploy ${{ steps.extract_branch_name.outputs.branch_name }} --push | |
if: startsWith(github.ref, 'refs/heads/docs') || startsWith(github.head_ref, 'docs/') | |
env: | |
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} |