forked from mirrors/gstreamer-rs
Base pages on gir-docs
This commit is contained in:
parent
7c592a5b9b
commit
8e05ee28ed
2 changed files with 29 additions and 8 deletions
|
@ -28,8 +28,13 @@ include:
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
FDO_UPSTREAM_REPO: gstreamer/gstreamer-rs
|
FDO_UPSTREAM_REPO: gstreamer/gstreamer-rs
|
||||||
RUST_DOCS_FLAGS: "--extern-html-root-url=glib=https://gtk-rs.org/gtk-rs/git/docs/ --extern-html-root-url=gio=https://gtk-rs.org/gtk-rs/git/docs/ --extern-html-root-url=muldiv=https://docs.rs/muldiv/1.0.0/muldiv/ --enable-index-page -Z unstable-options"
|
RUST_DOCS_FLAGS: "--extern-html-root-url=muldiv=https://docs.rs/muldiv/1.0.0/muldiv/ -Z unstable-options"
|
||||||
|
# format is <branch>=<name>
|
||||||
|
# the name is used in the URL
|
||||||
|
# latest release must be at the top
|
||||||
|
# (only relevant on master branch)
|
||||||
|
RELEASES:
|
||||||
|
0.16=0.16
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- "container-base"
|
- "container-base"
|
||||||
|
@ -447,27 +452,42 @@ docs:
|
||||||
extends: .img-nightly
|
extends: .img-nightly
|
||||||
stage: 'extras'
|
stage: 'extras'
|
||||||
script:
|
script:
|
||||||
|
- curl --proto '=https' --tlsv1.2 -sSf -o gir-docs.py
|
||||||
|
https://gitlab.gnome.org/World/Rust/gir-docs/-/raw/main/gir-docs.py
|
||||||
|
- chmod +x gir-docs.py
|
||||||
- PATH=~/.cargo/bin/:$PATH ./generator.py --embed-docs --no-fmt
|
- PATH=~/.cargo/bin/:$PATH ./generator.py --embed-docs --no-fmt
|
||||||
- |
|
- |
|
||||||
crate_names=$(for manifest in gstreamer*/Cargo.toml; do echo -n " -p ${manifest%%/Cargo.toml}"; done)
|
RUSTDOCFLAGS="$RUST_DOCS_FLAGS"
|
||||||
crate_names="$crate_names -p gstreamer-gl-egl -p gstreamer-gl-wayland -p gstreamer-gl-x11"
|
eval $(./gir-docs.py pre-docs)
|
||||||
RUSTDOCFLAGS="$RUST_DOCS_FLAGS" cargo +nightly doc $crate_names --color=always --features=dox --no-deps
|
cargo +nightly doc --workspace --exclude examples --exclude tutorials --color=always --features=dox --no-deps
|
||||||
- mv target/doc public/
|
- mv target/doc docs
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- 'public'
|
- 'docs'
|
||||||
|
|
||||||
# https://docs.gitlab.com/ee/user/project/pages/#how-it-works
|
# https://docs.gitlab.com/ee/user/project/pages/#how-it-works
|
||||||
# GitLab automatically deploys the `public/` folder from an
|
# GitLab automatically deploys the `public/` folder from an
|
||||||
# artifact generated by the job named `pages`. This step
|
# artifact generated by the job named `pages`. This step
|
||||||
# re-uses the docs from the build-test `docs` step above.
|
# re-uses the docs from the build-test `docs` step above.
|
||||||
pages:
|
pages:
|
||||||
|
extends: .img-nightly
|
||||||
stage: 'deploy'
|
stage: 'deploy'
|
||||||
when: 'manual'
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- docs
|
- docs
|
||||||
script:
|
script:
|
||||||
|
- curl --proto '=https' --tlsv1.2 -sSf -o gir-docs.py
|
||||||
|
https://gitlab.gnome.org/World/Rust/gir-docs/-/raw/main/gir-docs.py
|
||||||
|
- chmod +x gir-docs.py
|
||||||
|
- ./gir-docs.py html-index
|
||||||
|
# development docs
|
||||||
|
- mkdir public/git
|
||||||
|
- mv docs public/git/docs
|
||||||
|
# stable docs
|
||||||
|
- ./gir-docs.py docs-from-artifacts
|
||||||
- ls public/
|
- ls public/
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- 'public'
|
- 'public'
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
|
||||||
|
when: 'manual'
|
||||||
|
|
1
public/_redirects
Normal file
1
public/_redirects
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/gstreamer-rs/gstreamer/ /gstreamer-rs/stable/latest/docs/gstreamer 301
|
Loading…
Reference in a new issue