Code Monkey home page Code Monkey logo

do-space-sync-action's Introduction

GitHub Action to Sync DigitalOcean Space ๐Ÿ”„

โš ๏ธ Note: To use this action, you must have access to the GitHub Actions feature. GitHub Actions are currently only available in public beta. You can apply for the GitHub Actions beta here.

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.

Performing this action deletes any files in the bucket that are not present in the source directory. Working on making this optional in the next release!

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

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/idlefingers/do-space-sync-action with small changes to make the s3 commands work with DigitalOcean.

do-space-sync-action's People

Contributors

jakejarvis avatar ramakanthreddyl avatar idlefingers avatar

Stargazers

Bruno Gomes avatar Levi Gonzales avatar John Robinson avatar Rene Hernandez avatar Ram avatar

Watchers

James Cloos avatar

Forkers

lvstross

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.