Publishing to S3
To publish documentation to S3 storage, use the yfm publish command.
Warning
The command does not build documentation — you need to build it with yfm build before publishing.
# Build documentation
yfm build -i docs/ -o docs-html/
# Publish to S3
yfm publish -i docs-html/ \
--bucket "my-docs-bucket" \
--access-key-id "YCAJE..." \
--secret-access-key "YCO..."
publish command arguments
|
Argument |
Description |
Default |
|
|
Path to the directory with the built documentation |
— |
|
|
S3 storage endpoint |
|
|
|
Bucket name |
— |
|
|
File path prefix. |
— |
|
|
S3 storage region |
|
|
|
List of glob patterns for files that should not be uploaded to the storage |
— |
|
|
S3 access key ID |
— |
|
|
S3 secret access key |
— |
Some parameters are recommended to be specified in the configuration file. This avoids repeating them on every command run. Sensitive data (--access-key-id, --secret-access-key) should be passed only as command-line arguments.
Examples
publish section in the .yfm configuration file
publish:
endpoint: "https://storage.yandexcloud.net"
bucket: "my-docs-bucket"
prefix: "docs/"
region: "eu-central-1"
hidden:
- ".yfm"
Command-line arguments
yfm publish -i docs-html/ \
--endpoint "https://storage.yandexcloud.net" \
--bucket "my-docs-bucket" \
--prefix "docs/v1.0/" \
--region "eu-central-1" \
--access-key-id "YCAJE..." \
--secret-access-key "YCO..."