DEV Community

Discussion on: Adding Environment Variables To GitHub Actions

Collapse
 
dmitrijt9 profile image
Dmitrij T.

Hi, thanks :)
Helped me while deploying my Nuxtjs static web app to Github Pages.

There was just one difference that I should create my secrets in github-pages environment (github.com/[USERNAME]/[REPOSITORY]...).

And then add env section to generate step with my secrets like this:

 - name: Generate
   env:
     GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
     GOOGLE_API_URL: ${{ secrets.GOOGLE_API_URL }}
   run: yarn run generate
Enter fullscreen mode Exit fullscreen mode