nebula-dev / spaces-sync-action

GitHub Action to sync content into repository-specific directory while respecting directory structure
11 stars 5 forks source link

DigitalOcean Spaces Sync

GitHub Action to sync content into repository-specific directory within a DigitalOcean Space, while respecting directory structure.

Usage/Configuration

Setup a workflow YML file for this task (.github/workflows/<name_this>.yml). Check out GitHub's workflow syntax documentation.

Here is an example workflow file:

name: CDN Deployment
on: push

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: nebula-dev/spaces-sync-action@master
      env:
        SOURCE_DIR: './static/'
        SPACE_REGION: 'sfo2'
        SPACE_NAME: ${{ secrets.SPACE_NAME }}
        SPACE_ACCESS_KEY: ${{ secrets.SPACE_ACCESS_KEY }}
        SPACE_SECRET_KEY: ${{ secrets.SPACE_SECRET_KEY }}

Setup the access and secret keys as encrypted secrets, either for your repository or organization. You can also do this for the space name, as in the example above.