action-netlify-deploy
action-netlify-deploy copied to clipboard
The error about 1.7.2
When I deployment with v1.7.2. A error was thrown and the shell stoped
246 packages are looking for funding
run `npm fund` for details
found 39 vulnerabilities (31 moderate, 8 high)
run `npm audit fix` to fix them, or `npm audit` for details
npm ERR! missing script: build
npm ERR! A complete log of this run can be found in:
npm ERR! /github/home/.npm/_logs/2022-01-24T07_41_21_186Z-debug.log
Here is my configuration:
- name: Build document
run: npm run build
working-directory: docs/document/website
- uses: jsmrcaga/[email protected]
with:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DOCUMENT_ID }}
deploy_alias: 'staging'
build_directory: './docs/document/website/build/xxx'
And v1.7.0 with the same configuration can be deployed normaly
Run `npm audit` for details.
npm ERR! Missing script: "build"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! /github/home/.npm/_logs/2022-01-19T03_35_17_750Z-debug-0.log
- Hashing files...
✔ Finished hashing 18 files
- CDN diffing files...
✔ CDN requesting 0 files
- Uploading 0 files
✔ Finished uploading 0 assets
- Waiting for deploy to go live...
✔ Deploy is live!
Deploying to draft URL...
Please take a look. Thank you very much!
In both versions it's giving an error because you don't have a build
script defined in your package.json
. If you don't have a build
script, don't run the npm run build
in your steps.
Also, your indentation looks wrong in the configuration you posted; YAML is whitespace-sensitive so you must make sure it aligns properly.
Closing for inactivity. Please let me know if you managed to use the action or if the new versions solved it!