servo/.github/workflows/docs.yml
Martin Robinson 01013b9ea8
Re-enable minification to fix the doc build (#30871)
Disable isn't possible for non-nightly versions of Rust, so this is
currently breaking the doc build. In addition, it seems that the
original issue that triggered this change [^1] is now fixed.

[^1]: https://github.com/rust-lang/rust/issues/58849
2023-12-13 16:57:43 +00:00

38 lines
1.1 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-20.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: 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 }}