Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

when using the modul I get "Error: Command "dataset" is not available outside of a Sanity project context." #10

Open
devopsweep opened this issue Oct 25, 2022 · 1 comment

Comments

@devopsweep
Copy link

Hi,
when I use the workflow you published:

jobs:
  backup-dataset:
    runs-on: ubuntu-18.04
    name: Backup dataset
    steps:
      - uses: actions/checkout@v2
      - name: Export dataset
        uses: sanity-io/github-action-sanity@v0.3
        env:
          SANITY_AUTH_TOKEN: ${{ secrets.SANITY_AUTH_TOKEN }}
        with:
          args: . dataset export production backups/backup.tar.gz
      - name: Upload backup.tar.gz
        uses: actions/upload-artifact@v2
        with:
          name: backup-tarball
          path: backups/backup.tar.gz
          # Fails the workflow if no files are found; defaults to 'warn'
          if-no-files-found: error

I get this error on each:
Error: Command "dataset" is not available outside of a Sanity project context.

@saifmahamood
Copy link

Faced the same issue today.

The `sanity` module is not installed in current project
Project-specific commands not available until you run `npm install`
Error: Command "deploy" is not available outside of a Sanity project context.
Run the command again within a Sanity project directory, where "sanity"
is installed as a dependency.
    at CommandRunner.runCommand (/usr/local/share/.config/yarn/global/node_modules/@sanity/cli/lib/_chunks-cjs/cli.js:71721:13)
    at Object.runCli (/usr/local/share/.config/yarn/global/node_modules/@sanity/cli/lib/_chunks-cjs/cli.js:7210[8](https://github.com/shafi-fiqh/inheritance-sanity/actions/runs/10104330217/job/27943137119#step:4:9):38)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants