actions-netlify icon indicating copy to clipboard operation
actions-netlify copied to clipboard

Netlify preview build not using netlify.toml

Open Shaquu opened this issue 2 years ago • 2 comments

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

Shaquu avatar Jan 18 '22 20:01 Shaquu

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.

nwtgck avatar Jan 25 '22 00:01 nwtgck

why not? it's supported by the netlify cli

airtonix avatar Jul 07 '22 00:07 airtonix