gitlab-versioned-pages
Include documentation for multiple project versions in a single GitLab page.
Overview
This package can be used inside a pages job in your .gitlab-ci.yml pipeline in order to combine documentation for all tagged versions of the package. See the .gitlab-ci.yml of this package for an example.
This package also generates a versions.json, which can be used together with e.g. the Sphinx msmb_theme in order to include a version selector on the documentation page for each version
Usage
Add the following stage in your .gitlab-ci.yml file to collect documentations for all tagged versions and include them in a single page. The GITLAB_TOKEN is a private token that can be created manually inside the GitLab settings page.
pages:
stage: custom
before_script:
- pip install gitlab_versioned_pages
script:
- mkdir -p ./public
- python -m gitlab_versioned_pages
--project-id ${CI_PROJECT_ID}
--job-name docs
--private-token ${GITLAB_TOKEN}
--output-dir ./public
--url "https://${CI_PROJECT_NAMESPACE}.gitlab.io/${CI_PROJECT_NAME}"
artifacts:
paths:
- public
only:
variables:
- $UPDATE_PAGES
Implementation details
This file creates a ./public folder containing documentation created for multiple versions (tags) of this repository.
When the repository is public, our job is easy: we simply download the artifact.zip file from a publicly-accessible URL (see: downloading the latest artifacts). However, when the repository is private, using the above-mentioned URL does not work (see: gitlab-org/gitlab-ce#22957). In that case, we resort to using the GitLab API instead.
If gitlab-org/gitlab-ce#22957 is ever fixed, we would be able to specify
--header "Private-Token: XXXXX" or attach &private_token=XXXXX to the query string,
and keep using the original URL:
curl --header "Private-Token: XXXXX" \
"https://gitlab.com/user/repo/-/jobs/artifacts/ref/download?job=job_name"
Good resource: https://docs.gitlab.com/ee/api/jobs.html#download-the-artifacts-archive.
Metadata
Release files for gitlab-versioned-pages 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gitlab-versioned-pages-0.1.6.tar.gz | 18.0 kB | Without provenance | Details for gitlab-versioned-pages-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gitlab_versioned_pages-0.1.6-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for gitlab_versioned_pages-0.1.6-py2.py3-none-any.whl |
Total release size: 26.4 kB
Release files / gitlab-versioned-pages-0.1.6.tar.gz
| Download URL | gitlab-versioned-pages-0.1.6.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8dec708938ac772250d8ccd04dc3ebaad8288ef70a6b9ee9e1ac6e1fc2fa3c71
|
|
BLAKE2b-256 checksum How to use checksums |
ef59a4f92630c8026f3a85c7fc3e629f499994f77ca04c177d363854b829c69d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.6
|
Release files / gitlab_versioned_pages-0.1.6-py2.py3-none-any.whl
| Download URL | gitlab_versioned_pages-0.1.6-py2.py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
7e6b9f3db79af6f61602970ea40b6e4839aa9cb3e326c05214ae64c65ab8dbc3
|
|
BLAKE2b-256 checksum How to use checksums |
f0608b79084ddd4d1f1a11a313bc1dfa9f451179091a9b1e85446dfa9a4aaae1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.6
|
Security for gitlab-versioned-pages 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.