Releases: SimTech-Research-Data-Management/dataverse-sync
Releases · SimTech-Research-Data-Management/dataverse-sync
v3
v2 Hot Fix
v1
Dataverse Repository Sync
Are you looking for an easy way to work with Dataverse? If so, you might find this GitHub workflow helpful. It's basically a mini-git system that syncs your repository with your Dataverse dataset. Here's what it does:
- Pushes all your repository files to your dataset
- Detects any changes and updates your dataset files accordingly
- Removes any files from your dataset that are not in your repository
- Lets you push content to any directory within your dataset.
Hope that helps!
Usage
# Push to the root of the dataset
- name: Synchronize to DV
uses: JR-1991/dataverse-sync@v1
with:
dataverse_url: "https://demo.dataverse.org"
api_token: ${ secrets.MY_API_TOKEN }
persistent_id: "doi:10.5072/FK2/ABC123"
# Push to a specific sub directory
- name: Synchronize to DV
uses: JR-1991/dataverse-sync@v1
with:
dataverse_url: "https://demo.dataverse.org"
api_token: ${ secrets.MY_API_TOKEN }
persistent_id: "doi:10.5072/FK2/ABC123"
directory: "some/sub/dir"Inputs
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|---|---|---|---|---|
| api_token | string | true | The API Token used for authentication |
|
| dataverse_url | string | true | The URL of the Dataverse instance. |
|
| directory | string | true | The directory to which the respsitory needs to be synced |
|
| persistent_id | string | true | The persistent ID of the dataset. |
Complete workflow example
name: Dataverse Sync
# Choose whatever suits your needs
on: [push, release]
jobs:
dv-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Synchronize to DV
uses: JR-1991/dataverse-sync@v1
with:
dataverse_url: "Enter your Dataverse URL here"
api_token: ${{ secrets.DV_API_TOKEN }}
persistent_id: "Enter your dataset persistent ID here"