File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -24,17 +24,16 @@ jobs:
2424 - name : Install dependencies
2525 run : npm install
2626
27- # 4. Build the Vite project with environment variables from GitHub Secrets
27+ # 4. Build the Vite project using secrets directly in the build command
2828 - name : Build Vite project
29- env :
30- VITE_REACT_APP_EMAILJS_SERVICE_ID : ${{ secrets.VITE_REACT_APP_EMAILJS_SERVICE_ID }}
31- VITE_REACT_APP_EMAILJS_PUBLIC_KEY : ${{ secrets.VITE_REACT_APP_EMAILJS_PUBLIC_KEY }}
32- VITE_REACT_APP_EMAILJS_TEMPLATE_ID : ${{ secrets.VITE_REACT_APP_EMAILJS_TEMPLATE_ID }}
33- run : npm run build
29+ run : VITE_REACT_APP_EMAILJS_SERVICE_ID=${{ secrets.VITE_REACT_APP_EMAILJS_SERVICE_ID }} \
30+ VITE_REACT_APP_EMAILJS_PUBLIC_KEY=${{ secrets.VITE_REACT_APP_EMAILJS_PUBLIC_KEY }} \
31+ VITE_REACT_APP_EMAILJS_TEMPLATE_ID=${{ secrets.VITE_REACT_APP_EMAILJS_TEMPLATE_ID }} \
32+ npm run build
3433
35- # 5. Deploy to GitHub Pages
34+ # 5. Deploy to GitHub Pages securely using PAT (Personal Access Token)
3635 - name : Deploy to GitHub Pages
3736 uses : peaceiris/actions-gh-pages@v3
3837 with :
3938 publish_dir : ' ./dist' # Path to the built files
40- github_token : ${{ secrets.GITHUB_TOKEN }} # Use GitHub's automatically provided token
39+ github_token : ${{ secrets.GH_IO_PAT }} # Use your stored PAT for authentication
You can’t perform that action at this time.
0 commit comments