mirror of
https://github.com/servo/servo.git
synced 2025-06-04 07:35:36 +00:00
This allows us to use `uv` for: 1. Installing a pinned Python version 2. Installing the dependency packages using `uv`'s pip compatible interface. 4. Bootstrapping `mach` without a Python installion on the host, using `uv run` This change also introduces a new 'composite' GitHub action to setup python in the different CI workflows. There is no support for externally managed python installations and virtual environments. These could be added in the future. Fixes #34095, #34547 Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
name: Docs upload
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
upload-docs:
|
|
# This job is only useful when run on upstream servo.
|
|
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
|
|
name: Upload docs to GitHub Pages
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup Python
|
|
uses: ./.github/actions/setup-python
|
|
- name: Bootstrap
|
|
run: |
|
|
sudo apt update
|
|
python3 ./mach bootstrap --skip-lints
|
|
- name: Set LIBCLANG_PATH # This is needed for bindgen in mozangle.
|
|
run: echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV
|
|
- name: Compile docs
|
|
run: python3 ./mach doc
|
|
env:
|
|
RUSTDOCFLAGS: --document-private-items
|
|
- name: Upload docs
|
|
run: |
|
|
cd target/doc
|
|
git config --global init.defaultBranch main
|
|
git init
|
|
git add .
|
|
git -c user.name="Workflow" -c user.email="" \
|
|
commit -q -m "Rebuild Servo documentation"
|
|
git remote add origin https://git:${DOC_SERVO_ORG}@github.com/servo/doc.servo.org
|
|
git push --force origin main:gh-pages
|
|
env:
|
|
DOC_SERVO_ORG: ${{ secrets.DOC_SERVO_ORG }}
|