File tree Expand file tree Collapse file tree 5 files changed +19
-8
lines changed
Expand file tree Collapse file tree 5 files changed +19
-8
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -31,10 +31,17 @@ jobs:
3131 - name : Install dependencies
3232 run : npm i
3333
34+ - name : Generate environment configuration
35+ run : |
36+ jq \
37+ --arg accessKey "${WEB3FORMS_ACCESS_KEY}" \
38+ '.production = true | .contactFormAccessKey = $accessKey' \
39+ src/environments/environment.example.json > src/environments/environment.json
40+ env :
41+ WEB3FORMS_ACCESS_KEY : ${{ secrets.WEB3FORMS_ACCESS_KEY }}
42+
3443 - name : Build Angular app for GitHub Pages
3544 run : npm run build -- --configuration production
36- env :
37- NG_APP_CONTACT_FORM_ACCESS_KEY : ${{ secrets.WEB3FORMS_ACCESS_KEY }}
3845
3946 - name : Upload artifact
4047 uses : actions/upload-pages-artifact@v3
Original file line number Diff line number Diff line change @@ -42,3 +42,5 @@ __screenshots__/
4242# System files
4343.DS_Store
4444Thumbs.db
45+
46+ environment.json
Original file line number Diff line number Diff line change 1+ {
2+ "production" : false ,
3+ "contactFormAccessKey" : " your-access-key-here"
4+ }
Original file line number Diff line number Diff line change 1+ import json from './environment.json' ;
2+
13export interface Environment {
24 readonly production : boolean ;
35 readonly contactFormAccessKey : string ;
46}
57
68export const environment : Environment = {
7- production : import . meta. env . PROD ,
8- contactFormAccessKey :
9- import . meta. env . NG_APP_CONTACT_FORM_ACCESS_KEY ??
10- import . meta. env . VITE_CONTACT_FORM_ACCESS_KEY ??
11- '' ,
9+ production : json . production ,
10+ contactFormAccessKey : json . contactFormAccessKey ,
1211} ;
You can’t perform that action at this time.
0 commit comments