Publish folder to s3 storage with mc
Find a file
Dyakov Roman fdcefdb805
Temporary fix mv
mv dir to dir/subdir not not supported https://github.com/minio/mc/pull/5173

todo: make a content backup durung uploading
2025-04-13 22:22:49 +03:00
action.yml Temporary fix mv 2025-04-13 22:22:49 +03:00
LICENSE Publish action 2024-11-19 23:23:59 +03:00
README.md Publish action 2024-11-19 23:23:59 +03:00

Publish folder to S3

Use mc CLI to upload file or folder to s3 storage. Check out mc-actions/configure docs to find out how to set up your s3 storage provider.

Examples

Upload static folder of your repo to the root of mybucket bucket on server https://minio.compny:

steps:
- name: Checkout repository
  uses: actions/checkout@v4
- name: Confugure S3 client
  uses: mc-actions/configure@v1
  with:
    s3_server: 'https://minio.compny'
    s3_access_key: '${{ secrets.S3_ACCESS_KEY }}'
    s3_secret_key: '${{ secrets.S3_SECRET_KEY }}'
- name: Publish repository
  uses: mc-actions/publish@v1
  with:
    from: './static'
    server_bucket: 'mybucket'

Action inputs

The following action inputs are available to configure mc:

Name description Example
server_alias Any string
Optional, default default

Name of server to use in CLI. Do not edit if you will use other mc-actions.
play
s3_bucket Any string
Required

Name of bucket to store files in
mybucket
from Any string
Required

Path to file or folder to upload
./dist
to Any string
Optional, default root of bucket

Where to store document in /absolute/path/to/folder format
/path/to/folder