Deploying to S3
To publish documentation to S3 storage, use the yfm publish command.
Warning
The command does not build the documentation — it must be built with yfm build before publishing.
# Building documentation
yfm build -i docs/ -o docs-html/
# Publishing to S3
yfm publish -i docs-html/ \
--access-key-id "YCAJE..." \
--secret-access-key "YCO..."
Arguments of the publish command
|
Argument |
Description |
Default value |
|
|
Path to the directory with the built documentation |
— |
|
|
Endpoint for the S3 storage |
|
|
|
Bucket name |
— |
|
|
Prefix for file paths. |
— |
|
|
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 |
— |
It is recommended to move some parameters to the configuration file. This avoids repeating them every time the command is run. Sensitive data (--access-key-id, --secret-access-key) is passed only via arguments.
Examples
The publish section in the configuration file .yfm
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..."