Created
April 12, 2022 12:29
-
-
Save felixfontein/c851fa4ef503c6394c82ad9f900077a7 to your computer and use it in GitHub Desktop.
antsibull-docs demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create and activate Python virtual environment | |
python3 -m venv antsibull-test | |
cd antsibull-test | |
. bin/activate | |
# Install ansible-core and antsibull-docs | |
pip install ansible-core antsibull-docs | |
# Create collection directory | |
mkdir collections | |
export ANSIBLE_COLLECTIONS_PATHS="$(pwd)/collections/" | |
# Install community.crypto from Galaxy | |
ansible-galaxy collection install community.crypto | |
# Install community.docker from git | |
git clone https://github.com/ansible-collections/community.docker.git collections/ansible_collections/community/docker | |
# Create simple docsite | |
mkdir docsite | |
antsibull-docs sphinx-init --help | |
antsibull-docs sphinx-init --use-current --dest-dir docsite/ community.crypto community.docker | |
# Set up docsite build | |
cd docsite | |
pip install -r requirements.txt | |
# Look at what the build script does | |
cat ./build.sh | |
# Run the build script | |
./build.sh | |
# Look at HTML output | |
chromium build/html/index.html | |
# Validate collection documentation | |
antsibull-docs lint-collection-docs collections/ansible_collections/community/crypto/ | |
antsibull-docs lint-collection-docs collections/ansible_collections/community/docker/ | |
# GitHub Actions workflow for validating collection docs: | |
https://github.com/ansible-collections/collection_template/blob/main/.github/workflows/extra-docs-linting.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are interested in GHA actions related to this, take a look at https://github.com/ansible-community/github-docs-build