Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Commit 18183bd

Browse files
committed
Angular: Write env file on build
1 parent 300e814 commit 18183bd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/build.yml

+13
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,19 @@ jobs:
1616
with:
1717
ref: master
1818

19+
- name: Write environment.prod.ts file
20+
env:
21+
API_URL: ${{ secrets.API_URL }}
22+
CLIENT_ID: ${{ secrets.CLIENT_ID }}
23+
run: |
24+
cat <<EOF > Angular/src/environments/environment.prod.ts
25+
export const environment = {
26+
production: true,
27+
apiUrl: '$API_URL',
28+
clientId: '$CLIENT_ID',
29+
};
30+
EOF
31+
1932
- name: Build angular project and publish to github page
2033
uses: AhsanAyaz/angular-deploy-gh-pages-actions@v1.3.1
2134
with:

0 commit comments

Comments
 (0)