github-action-sanity
github-action-sanity copied to clipboard
when using the modul I get "Error: Command "dataset" is not available outside of a Sanity project context."
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/[email protected]
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.
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)