mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
Default azure mirror suck and we already used this in linux/linux-wpt workflows. --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
48 lines
1.5 KiB
YAML
48 lines
1.5 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@v5
|
|
- name: Free Disk Space (Ubuntu)
|
|
uses: jlumbroso/free-disk-space@main
|
|
with:
|
|
tool-cache: false
|
|
large-packages: false
|
|
swap-storage: false
|
|
- name: Setup Python
|
|
uses: ./.github/actions/setup-python
|
|
- name: Change Mirror Priorities
|
|
uses: ./.github/actions/apt-mirrors
|
|
- name: Bootstrap
|
|
run: |
|
|
sudo apt update
|
|
./mach bootstrap --yes --skip-lints --skip-nextest
|
|
- 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: ./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 }}
|