Files
llvm/.github/workflows/release-documentation.yml
Mend Renovate aa04b654b4 [Github] Update GHA Dependencies (#170057)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
|
[actions/setup-python](https://redirect.github.com/actions/setup-python)
| action | minor | `v6.0.0` -> `v6.1.0` | |
|
[github/codeql-action](https://redirect.github.com/github/codeql-action)
| action | patch | `v4.31.4` -> `v4.31.5` | `v4.31.6` |
|
[hendrikmuhs/ccache-action](https://redirect.github.com/hendrikmuhs/ccache-action)
| action | patch | `v1.2.19` -> `v1.2.20` | |
2025-12-01 06:26:22 -08:00

96 lines
3.0 KiB
YAML

name: Release Documentation
permissions:
contents: read
on:
workflow_dispatch:
inputs:
release-version:
description: 'Release Version'
required: true
type: string
upload:
description: 'Upload documentation'
required: false
type: boolean
workflow_call:
inputs:
release-version:
description: 'Release Version'
required: true
type: string
upload:
description: 'Upload documentation'
required: false
type: boolean
secrets:
WWW_RELEASES_TOKEN:
description: "Secret used to create a PR with the documentation changes."
required: false
jobs:
release-documentation:
name: Build and Upload Release Documentation
runs-on: ubuntu-24.04
env:
upload: ${{ inputs.upload && !contains(inputs.release-version, 'rc') }}
steps:
- name: Checkout LLVM
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Setup Python env
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
cache: 'pip'
cache-dependency-path: './llvm/docs/requirements.txt'
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
graphviz \
python3-github \
ninja-build \
texlive-font-utils
pip3 install --user -r ./llvm/docs/requirements.txt
- name: Build Documentation
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
./llvm/utils/release/build-docs.sh -release "${{ inputs.release-version }}" -no-doxygen
- name: Create Release Notes Artifact
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0
with:
name: release-notes
path: docs-build/html-export/
- name: Clone www-releases
if: env.upload
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
repository: ${{ github.repository_owner }}/www-releases
ref: main
fetch-depth: 0
path: www-releases
persist-credentials: false
- name: Upload Release Notes
if: env.upload
env:
GH_TOKEN: ${{ secrets.WWW_RELEASES_TOKEN }}
run: |
mkdir -p www-releases/${{ inputs.release-version }}
mv ./docs-build/html-export/* www-releases/${{ inputs.release-version }}
cd www-releases
git checkout -b ${{ inputs.release-version }}
git add ${{ inputs.release-version }}
git config user.email "llvmbot@llvm.org"
git config user.name "llvmbot"
git commit -a -m "Add ${{ inputs.release-version }} documentation"
git push --force "https://$GH_TOKEN@github.com/llvmbot/www-releases.git" HEAD:refs/heads/${{ inputs.release-version }}
gh pr create -f -B main -H ${{ inputs.release-version }} -R llvmbot/www-releases