v1.39.2 #196
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: documentation release | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: "specific version to publish" | |
jobs: | |
docs-release: | |
name: Documentation release | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check-out | |
uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
working-directory: docs | |
ruby-version: '3.2' | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Extract version | |
id: version | |
shell: bash | |
run: | | |
if [ "${{ github.event.inputs.tag }}" != "" ]; then | |
echo "tag=$(echo ${{ github.event.inputs.tag }} | cut -d. -f1-2)" >> $GITHUB_OUTPUT | |
else | |
echo "tag=$(echo ${GITHUB_REF##*/} | cut -d. -f1-2)" >> $GITHUB_OUTPUT | |
fi | |
- name: Build release | |
working-directory: docs | |
run: bundle exec jekyll build --config _config.yml,_config.version.yml -d _site/${{ steps.version.outputs.tag }} -b /${{ steps.version.outputs.tag }} | |
- name: Remove robots.txt | |
working-directory: docs/_site/${{ steps.version.outputs.tag }} | |
run: | | |
if [[ -f robots.txt ]]; then rm robots.txt; fi | |
- name: Update published version | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.PERSONAL_TOKEN }} | |
run: > | |
curl -s https://${API_TOKEN_GITHUB}@raw.githubusercontent.com/treeverse/docs-lakeFS/main/versions.json | | |
jq '."${{ steps.version.outputs.tag}}" = "${{ steps.version.outputs.tag}}"' > docs/_site/versions.json | |
- name: Publish to lakeFS-docs repository | |
env: | |
SSH_DEPLOY_KEY: '${{ secrets.SSH_LAKEFS_DOCS_DEPLOY_KEY }}' | |
SOURCE_DIRECTORY: 'docs/_site/' | |
GIT_CMD_REPOSITORY: 'git@github.com:treeverse/docs-lakeFS.git' | |
USER_EMAIL: 'support@treeverse.io' | |
USER_NAME: 'docs-action' | |
shell: bash | |
run: ./.github/scripts/push-repo.sh |