5880a98163
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [CodSpeedHQ/action](https://redirect.github.com/CodSpeedHQ/action) | action | pinDigest | -> `0010eb0` | | [EmbarkStudios/cargo-deny-action](https://redirect.github.com/EmbarkStudios/cargo-deny-action) | action | pinDigest | -> `3f4a782` | | [PyO3/maturin-action](https://redirect.github.com/PyO3/maturin-action) | action | pinDigest | -> `36db840` | | [SebRollen/toml-action](https://redirect.github.com/SebRollen/toml-action) | action | pinDigest | -> `b1b3628` | | [Swatinem/rust-cache](https://redirect.github.com/Swatinem/rust-cache) | action | pinDigest | -> `f0deed1` | | [acj/freebsd-firecracker-action](https://redirect.github.com/acj/freebsd-firecracker-action) | action | pinDigest | -> `4d93174` | | [actions/attest-build-provenance](https://redirect.github.com/actions/attest-build-provenance) | action | pinDigest | -> `c074443` | | [actions/checkout](https://redirect.github.com/actions/checkout) | action | pinDigest | -> `11bd719` | | [actions/setup-python](https://redirect.github.com/actions/setup-python) | action | pinDigest | -> `4237552` | | [astral-sh/setup-uv](https://redirect.github.com/astral-sh/setup-uv) | action | pinDigest | -> `f94ec6b` | | [conda-incubator/setup-miniconda](https://redirect.github.com/conda-incubator/setup-miniconda) | action | pinDigest | -> `505e639` | | [docker/build-push-action](https://redirect.github.com/docker/build-push-action) | action | pinDigest | -> `471d1dc` | | [docker/login-action](https://redirect.github.com/docker/login-action) | action | pinDigest | -> `74a5d14` | | [docker/metadata-action](https://redirect.github.com/docker/metadata-action) | action | pinDigest | -> `902fa8e` | | [docker/setup-buildx-action](https://redirect.github.com/docker/setup-buildx-action) | action | pinDigest | -> `b5ca514` | | [ludeeus/action-shellcheck](https://redirect.github.com/ludeeus/action-shellcheck) | action | pinDigest | -> `00cae50` | | [peter-evans/create-pull-request](https://redirect.github.com/peter-evans/create-pull-request) | action | pinDigest | -> `271a8d0` | | [taiki-e/install-action](https://redirect.github.com/taiki-e/install-action) | action | pinDigest | -> `2153a01` | | [uraimo/run-on-arch-action](https://redirect.github.com/uraimo/run-on-arch-action) | action | pinDigest | -> `ac33288` | | [webfactory/ssh-agent](https://redirect.github.com/webfactory/ssh-agent) | action | pinDigest | -> `dc588b6` | --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/astral-sh/uv). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDAuMCIsInVwZGF0ZWRJblZlciI6IjM5LjIwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
144 lines
5.0 KiB
YAML
144 lines
5.0 KiB
YAML
# Publish the uv documentation.
|
|
#
|
|
# Assumed to run as a subworkflow of .github/workflows/release.yml; specifically, as a post-announce
|
|
# job within `cargo-dist`.
|
|
name: mkdocs
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
ref:
|
|
description: "The commit SHA, tag, or branch to publish. Uses the default branch if not specified."
|
|
default: ""
|
|
type: string
|
|
workflow_call:
|
|
inputs:
|
|
plan:
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
mkdocs:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
MKDOCS_INSIDERS_SSH_KEY_EXISTS: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY != '' }}
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
with:
|
|
ref: ${{ inputs.ref }}
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
|
|
with:
|
|
python-version: 3.12
|
|
|
|
- name: "Set docs version"
|
|
run: |
|
|
version="${{ (inputs.plan != '' && fromJson(inputs.plan).announcement_tag) || inputs.ref }}"
|
|
# if version is missing, use 'latest'
|
|
if [ -z "$version" ]; then
|
|
echo "Using 'latest' as version"
|
|
version="latest"
|
|
fi
|
|
|
|
# Use version as display name for now
|
|
display_name="$version"
|
|
|
|
echo "version=$version" >> $GITHUB_ENV
|
|
echo "display_name=$display_name" >> $GITHUB_ENV
|
|
|
|
- name: "Set branch name"
|
|
run: |
|
|
version="${{ env.version }}"
|
|
display_name="${{ env.display_name }}"
|
|
timestamp="$(date +%s)"
|
|
|
|
# create branch_display_name from display_name by replacing all
|
|
# characters disallowed in git branch names with hyphens
|
|
branch_display_name="$(echo "$display_name" | tr -c '[:alnum:]._' '-' | tr -s '-')"
|
|
|
|
echo "branch_name=update-docs-$branch_display_name-$timestamp" >> $GITHUB_ENV
|
|
echo "timestamp=$timestamp" >> $GITHUB_ENV
|
|
|
|
- name: "Add SSH key"
|
|
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }}
|
|
uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0
|
|
with:
|
|
ssh-private-key: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY }}
|
|
|
|
- name: "Install Insiders dependencies"
|
|
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }}
|
|
run: pip install -r docs/requirements-insiders.txt
|
|
|
|
- name: "Install dependencies"
|
|
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS != 'true' }}
|
|
run: pip install -r docs/requirements.txt
|
|
|
|
- name: "Build Insiders docs"
|
|
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }}
|
|
run: mkdocs build --strict -f mkdocs.insiders.yml
|
|
|
|
- name: "Build docs"
|
|
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS != 'true' }}
|
|
run: mkdocs build --strict -f mkdocs.public.yml
|
|
|
|
- name: "Clone docs repo"
|
|
run: |
|
|
version="${{ env.version }}"
|
|
git clone https://${{ secrets.ASTRAL_DOCS_PAT }}@github.com/astral-sh/docs.git astral-docs
|
|
|
|
- name: "Copy docs"
|
|
run: rm -rf astral-docs/site/uv && mkdir -p astral-docs/site && cp -r site/uv astral-docs/site/
|
|
|
|
- name: "Commit docs"
|
|
working-directory: astral-docs
|
|
run: |
|
|
branch_name="${{ env.branch_name }}"
|
|
|
|
git config user.name "astral-docs-bot"
|
|
git config user.email "176161322+astral-docs-bot@users.noreply.github.com"
|
|
|
|
git checkout -b $branch_name
|
|
git add site/uv
|
|
git commit -m "Update uv documentation for $version"
|
|
|
|
- name: "Create Pull Request"
|
|
working-directory: astral-docs
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.ASTRAL_DOCS_PAT }}
|
|
run: |
|
|
version="${{ env.version }}"
|
|
display_name="${{ env.display_name }}"
|
|
branch_name="${{ env.branch_name }}"
|
|
|
|
# set the PR title
|
|
pull_request_title="Update uv documentation for $display_name"
|
|
|
|
# Delete any existing pull requests that are open for this version
|
|
# by checking against pull_request_title because the new PR will
|
|
# supersede the old one.
|
|
gh pr list --state open --json title --jq '.[] | select(.title == "$pull_request_title") | .number' | \
|
|
xargs -I {} gh pr close {}
|
|
|
|
# push the branch to GitHub
|
|
git push origin $branch_name
|
|
|
|
# create the PR
|
|
gh pr create --base main --head $branch_name \
|
|
--title "$pull_request_title" \
|
|
--body "Automated documentation update for $display_name" \
|
|
--label "documentation"
|
|
|
|
- name: "Merge Pull Request"
|
|
if: ${{ inputs.plan != '' && !fromJson(inputs.plan).announcement_tag_is_implicit }}
|
|
working-directory: astral-docs
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.ASTRAL_DOCS_PAT }}
|
|
run: |
|
|
branch_name="${{ env.branch_name }}"
|
|
|
|
# auto-merge the PR if the build was triggered by a release. Manual builds should be reviewed by a human.
|
|
# give the PR a few seconds to be created before trying to auto-merge it
|
|
sleep 10
|
|
gh pr merge --squash $branch_name
|