Skip to content

lumeohq/do-space-sync-action

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitHub Action to Sync DigitalOcean Space πŸ”„

This simple action uses the vanilla AWS CLI to sync a directory (either from your repository or generated during your workflow) with a remote DigitalOcean space.

Usage

workflow.yml Example

Place in a .yml file such as this one in your .github/workflows folder. Refer to the documentation on workflow YAML syntax here.

name: Sync Space
on: push

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: idlefingers/do-space-sync-action@master
      with:
        args: --acl public-read
      env:
        SOURCE_DIR: './public'
        SPACE_NAME: ${{ secrets.SPACE_NAME }}
        SPACE_REGION: ${{ secrets.SPACE_REGION}}
        SPACE_ACCESS_KEY_ID: ${{ secrets.SPACE_ACCESS_KEY_ID }}
        SPACE_SECRET_ACCESS_KEY: ${{ secrets.SPACE_SECRET_ACCESS_KEY }}

Required Environment Variables

Key Value Type Required
SOURCE_DIR The local directory you wish to sync/upload. For example, ./public. env Yes
SPACE_REGION The region where you created your space in. For example, fra1. Full list of regions here. env Yes
DELETE If set to true, deletes any files in the bucket that are not present in the source directory. Default: true. env No

Required Secret Variables

The following variables should be added as "secrets" in the action's configuration.

Key Value Type Required
SPACE_NAME The name of the space you're syncing to. For example, jarv.is. secret Yes
SPACE_ACCESS_KEY_ID Your Spaces Access Key. More info here. secret Yes
SPACE_SECRET_ACCESS_KEY Your Spaces Secret Access Key. More info here. secret Yes

License

This project is distributed under the MIT license.

Credits

This project is forked from https://github.com/jakejarvis/s3-sync-action with small changes to make the s3 commands work with DigitalOcean.

About

πŸ”„ GitHub Action to sync a directory with a DigitalOcean Spaces

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 58.6%
  • Shell 41.4%