mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
* Add llvm to path This is needed on 22.04 runners (that we started using in https://github.com/servo/servo/pull/31088). * Update docs.yml --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
40 lines
1.3 KiB
YAML
40 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@v3
|
|
with:
|
|
fetch-depth: 2
|
|
- name: Bootstrap
|
|
run: |
|
|
python3 -m pip install --upgrade pip
|
|
sudo apt update
|
|
python3 ./mach bootstrap
|
|
- 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 }}
|