vigliensoni / vigliensoni.com

https://vigliensoni.com
0 stars 0 forks source link

Set environmental variable. #1

Open vigliensoni opened 2 years ago

vigliensoni commented 2 years ago

This could be beneficial for using some shortcodes such as Instagram, for example.

instagram shortcode: Missing config value for services.instagram.accessToken. This can be set in config.toml, but it is recommended to configure this via the HUGO_SERVICES_INSTAGRAM_ACCESSTOKEN OS environment variable. If you are using a Client Access Token, remember that you must combine it with your App ID using a pipe symbol (<APPID>|<CLIENTTOKEN>) otherwise the request will fail.
If you feel that this should not be logged as an ERROR, you can ignore it by adding this to your site config:
ignoreErrors = ["error-missing-instagram-accesstoken"]

Screen Shot 2022-05-04 at 1 05 22 PM

vigliensoni commented 2 years ago

It seems environmental variables are set in environments. Then, Github actions take those environments into consideration and extract the variables.

https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment