Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Netlify preview build not using netlify.toml #720

Open
Shaquu opened this issue Jan 18, 2022 · 2 comments
Open

Netlify preview build not using netlify.toml #720

Shaquu opened this issue Jan 18, 2022 · 2 comments

Comments

@Shaquu
Copy link

Shaquu commented Jan 18, 2022

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/actions-netlify@v1.2.3
        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
NRCHKB/NRCHKB.github.io@622caa8

@Shaquu Shaquu changed the title Netlify preview build not using build script Netlify preview build not using netlify.toml Jan 18, 2022
@nwtgck
Copy link
Owner

nwtgck commented Jan 25, 2022

I'm not sure the action supports the command. The configuration file is loaded by a function officially provided:

configPath: netlifyConfigPath,

I'm not sure the action should support the command execution.

@airtonix
Copy link

airtonix commented Jul 7, 2022

why not? it's supported by the netlify cli

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

No branches or pull requests

3 participants