support: How to use the GitHub's encrypted secrets ?
CYS-Photographie opened this issue · 2 comments
Checklist
- I am using the latest version of this action.
- I have read the latest README and followed the instructions.
- I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.
Describe your question
Hi, I would like to use the encrypted repository secret "HUGO_GOOGLEANALYTICS" that I store into my repository to be used into your script.
The reason to not have it directly into the config file is that I'm actually doing tests and the website is deployed also into vercel and netlify. So I've configured the env variables into the 2 others and all is good, Google Analytics tracker is present when I check it with Privacy Badger.
I've added some code into my gh-pages.yml to retrieve and use the ID of GA, but at each deploy Privacy Badger seems to show that no tracker is implemented (nothing at all into GA also).
Relevant links
Public repository: https://github.com/CYS-Photographie/CYS-Photographie.github.io
YAML config: https://github.com/CYS-Photographie/CYS-Photographie.github.io/blob/master/config.yaml
YAML workflow: https://github.com/CYS-Photographie/CYS-Photographie.github.io/blob/master/.github/workflows/gh-pages.yml
Actions workflow & logs : https://github.com/CYS-Photographie/CYS-Photographie.github.io/actions/runs/3271600856
Relevant log output
It seems to have no error regarding the summary
Additional context.
Skill level of coding : pretty low.
No more additional context.
Thanks for your help !
I success to make it worked with this adding on build :
- name: Build
run: hugo --gc --minify
env: # Or as an environment variable
HUGO_GOOGLEANALYTICS: ${{ secrets.HUGO_GOOGLEANALYTICS }}
I surely added bad way the first time.
I close the issue.