actions-netlify
actions-netlify copied to clipboard
Netlify preview build not using netlify.toml
Currently standard preview with comment to PR works. I have issues regarding using custom build command for preview. If successful urls on preview should consist of DEPLOY_URL (not the one configured in config files, I tested locally the same command and it worked).
gh action
- name: Netlify Actions
uses: nwtgck/[email protected]
with:
publish-dir: "./public"
github-token: ${{ secrets.GITHUB_TOKEN }}
netlify-config-path: ./netlify.toml
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN_NRCHKB_WIKI }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_NRCHKB_WIKI }}
netlify.toml
[context.deploy-preview]
command = "hugo -b $DEPLOY_URL"
[context.deploy-preview.environment]
HUGO_VERSION = "0.76"
Run https://github.com/NRCHKB/NRCHKB.github.io/commit/622caa8c8b06bc02eb6b5f16f1ceb0773a263141
I'm not sure the action supports the command. The configuration file is loaded by a function officially provided: https://github.com/nwtgck/actions-netlify/blob/99552499dc4207a31e262620f263e7cfdf39cf59/src/main.ts#L112
I'm not sure the action should support the command execution.
why not? it's supported by the netlify cli