alamb commented on code in PR #26828: URL: https://github.com/apache/datafusion/pull/26828#discussion_r4394200145
########## .github/workflows/docs_versions.yaml: ########## @@ -0,0 +1,87 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Publishes the documentation for released versions to +# https://datafusion.apache.org/versions/<version>/ +# +# The list of versions is in docs/source/_static/versions.json +# +# The current development docs are published from `main` by docs.yaml. + +on: + push: + branches: + - main + paths: + - .github/workflows/docs_versions.yaml + - docs/scripts/build_versions.sh + - docs/scripts/release/conf.py + - docs/source/_static/versions.json + - docs/pyproject.toml + - uv.lock + +name: Deploy DataFusion versioned docs + +# run the publishing workflows one at a time. +concurrency: + group: publish-asf-site + cancel-in-progress: false + +jobs: + build-versions: + permissions: + contents: write + name: Build versioned docs + runs-on: ubuntu-slim + steps: + - name: Checkout docs sources + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Checkout asf-site branch + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: asf-site + path: asf-site + + - name: Setup docs builder + uses: ./.github/actions/setup-docs-builder + + - name: Build versioned docs + env: + # See docs.yaml + DATAFUSION_DOCS_BASE_PATH: ${{ vars.DATAFUSION_DOCS_BASE_PATH }} + run: | + set -x + docs/scripts/build_versions.sh --output docs/build/versions Review Comment: calls the new script, and then the lines below copy this to the right place on asf-site ########## .github/workflows/docs.yaml: ########## @@ -26,12 +26,17 @@ on: name: Deploy DataFusion site +# run the publishing workflows one at a time. +concurrency: + group: publish-asf-site + cancel-in-progress: false + jobs: build-docs: permissions: contents: write name: Build docs - runs-on: ubuntu-latest + runs-on: ubuntu-slim Review Comment: We can run this on unbuntu-slim to save CI credits as everything is single threaded (though we do have to intall rust, so it takes a bit longer) ########## .github/actions/setup-docs-builder/action.yaml: ########## @@ -0,0 +1,39 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Prepare Docs Builder Review Comment: refactored common builder setup ########## dev/release/README.md: ########## @@ -315,71 +315,27 @@ git push apache 55.2.0 #### Publish the versioned documentation -**1. Build the documentation from the release tag** using the configuration -overlay (`docs/scripts/release/conf.py`) from the main checkout. For example, -for `55.0.0`, from the repository root: +Open a PR against `main` that adds the release to Review Comment: I think this is the best demonstration of what I am trying to accomplish with this PR. The instructions are quite simple ########## docs/scripts/build_versions.sh: ########## @@ -0,0 +1,200 @@ +#!/usr/bin/env bash Review Comment: this is the script that automates building old releases -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
