Skip to content

lakectl: Fix download path (#9401) #1

lakectl: Fix download path (#9401)

lakectl: Fix download path (#9401) #1

Workflow file for this run

name: docs
on:
push:
branches:
- master
paths:
- "docs/**"
- ".github/workflows/docs.yaml"
- ".github/workflows/docs-*.yaml"
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: "Version to publish (e.g., v1.2)"
required: true
type: string
set_latest:
description: "Set this version as latest"
required: false
default: false
type: boolean
jobs:
deploy:
name: Deploy Documentation
runs-on: ubuntu-latest
steps:
- name: Check-out
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
working-directory: docs
run: pip install -r requirements-docs.txt
- name: Checkout the documentation repository
uses: actions/checkout@v4
with:
repository: treeverse/docs-lakeFS
fetch-depth: 1
token: ${{ secrets.PERSONAL_TOKEN }}
path: docs/docs-repo
- name: Configure Git
working-directory: docs/docs-repo
run: |
git config --global user.name "treeverser"
git config --global user.email "treeverser@treeverse.io"
- name: Set deployment variables
id: setvars
shell: bash
run: |
VERSION="dev"
ALIASES=""
case "${{ github.event_name }}" in
release)
TAG="${{ github.event.release.tag_name }}"
if [[ "$TAG" =~ ^v?([0-9]+)\.([0-9]+) ]]; then
VERSION="v${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
ALIASES="--update-aliases latest"
else
echo "::error::Could not extract v<major>.<minor> from tag '$TAG'. Aborting deployment."
exit 1
fi
;;
workflow_dispatch)
INPUT_VERSION="${{ github.event.inputs.version }}"
if [[ "$INPUT_VERSION" =~ ^v?([0-9]+)\.([0-9]+) ]]; then
VERSION="v${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
else
echo "::error::Could not extract v<major>.<minor> from input version '$INPUT_VERSION'. Aborting deployment."
exit 1
fi
if [[ "${{ github.event.inputs.set_latest }}" == "true" ]]; then
ALIASES="--update-aliases latest"
fi
;;
push)
VERSION="dev"
ALIASES=""
;;
esac
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "ALIASES=$ALIASES" >> $GITHUB_OUTPUT
- name: Deploy documentation
working-directory: docs/docs-repo
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
run: |
mike deploy --config-file ../mkdocs.yml --branch main --push "${{ steps.setvars.outputs.VERSION }}" ${{ steps.setvars.outputs.ALIASES }}