Skip to content

Commit 107ad11

Browse files
committed
add secret environments
1 parent 7a28598 commit 107ad11

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Deploy React App to GitHub Pages
22

33
on:
44
push:
5-
branches: [ develop ]
5+
branches: [ master ]
66
pull_request:
7-
branches: [ develop ]
7+
branches: [ master ]
88

99
# Allow this workflow to create deployments and pages
1010
permissions:
@@ -27,7 +27,7 @@ jobs:
2727

2828
env:
2929
DEPLOY_USER: 'towfiq-ul'
30-
APP_VERSION: 'v3'
30+
APP_VERSION: 'v2'
3131

3232
steps:
3333
- uses: actions/checkout@v4
@@ -45,6 +45,17 @@ jobs:
4545
working-directory: ./${{ env.APP_VERSION }}
4646
run: npm ci
4747

48+
- name: Build Frontend with Secrets
49+
run: npm run build
50+
env:
51+
# This is the 'env' block.
52+
# LEFT SIDE (Key): This is the environment variable name available during 'npm run build'.
53+
# RIGHT SIDE (Value): This pulls the value from the GitHub Secret named VITE_RECEIVER_EMAIL.
54+
VITE_EMAILJS_PUBLIC_KEY: ${{ secrets.VITE_EMAILJS_PUBLIC_KEY }}
55+
VITE_EMAILJS_SERVICE_ID: ${{ secrets.VITE_EMAILJS_SERVICE_ID }}
56+
VITE_EMAILJS_TEMPLATE_ID: ${{ secrets.VITE_EMAILJS_TEMPLATE_ID }}
57+
VITE_RECEIVER_EMAIL: ${{ secrets.VITE_RECEIVER_EMAIL }}
58+
4859
- name: Build project
4960
working-directory: ./${{ env.APP_VERSION }}
5061
run: npm run build

0 commit comments

Comments
 (0)