Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
archive

GitHub Action

Dataverse Uploader Action

v1.1

Dataverse Uploader Action

archive

Dataverse Uploader Action

Uploads a repository to Dataverse

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Dataverse Uploader Action

uses: IQSS/[email protected]

Learn more about this action in IQSS/dataverse-uploader

Choose a version

Dataverse Uploader

This action uploads the repository content to a Dataverse dataset.

Input parameters

To use this action, you will need the following input parameters:

Parameter Required Description
DATAVERSE_TOKEN Yes This is your personal access token that you can create at your Dataverse instance (see the Dataverse guide). Save your token as a secret variable called DATAVERSE_TOKEN in your GitHub repository that you want to upload to Dataverse (see the GitHub guide).
DATAVERSE_SERVER Yes The URL of your Dataverse installation, i.e., https://dataverse.harvard.edu.
DATAVERSE_DATASET_DOI Yes This action requires that a dataset (with a DOI) exists on the Dataverse server. Make sure to specify your DOI in this format: doi:<doi>, i.e., doi:10.70122/FK2/LVUA.
GITHUB_DIR No Use GITHUB_DIR if you would like to upload files from only a specific subdirectory in your GitHub repository (i.e., just data/).

Usage

To use the action, create a new YML file (i.e., workflow.yml) in the directory .github/workflows/ in your GitHub repository.

The action workflow can be executed at trigger events such as push and release. If you'd only like to run the workflow manually from the Actions tab, use the workflow_dispatch event option.

Here is an example of a workflow.yml that actives the action on release and manually.

on: 
  release:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Send repo to Dataverse 
        uses: atrisovic/dataverse-uploader@master
        with:
          DATAVERSE_TOKEN: ${{secrets.DATAVERSE_TOKEN}}
          DATAVERSE_SERVER: https://demo.dataverse.org
          DATAVERSE_DATASET_DOI: doi:10.70122/FK2/LVUA

If you'd like to upload files from a specific subdirectory only, you should add the GITHUB_DIR argument in your action.

on: 
  release:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Send repo to Dataverse 
        uses: atrisovic/dataverse-uploader@master
        with:
          DATAVERSE_TOKEN: ${{secrets.DATAVERSE_TOKEN}}
          DATAVERSE_SERVER: https://demo.dataverse.org
          DATAVERSE_DATASET_DOI: doi:10.70122/FK2/LVUA
          GITHUB_DIR: data

Related projects

Check out the following related projects:

Dataverse Badge

Visit this page to create a Dataverse DOI Badge for your GitHub repository.

Stand-alone DVUploader

Looking for a stand-alone Dataverse uploader that will work from the command line? Check out DVUploader.

Contact

Don't hesitate to create an issue, a pull request, or contact us if you notice any problems with the action.