Skip to content

Commit 893c8c8

Browse files
authored
Add GitHub Actions workflow for deployment
1 parent 485a209 commit 893c8c8

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Deploy to GitHub Pages
2+
on:
3+
push:
4+
branches: [ main ]
5+
workflow_dispatch:
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
10+
jobs:
11+
build-and-deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v4
16+
- name: Setup Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: "20"
20+
- name: Install Dependencies
21+
run: npm install
22+
- name: Build Project
23+
run: npm run build
24+
env:
25+
REACT_APP_EMAILJS_SERVICE_ID: ${{ secrets.REACT_APP_EMAILJS_SERVICE_ID }}
26+
REACT_APP_EMAILJS_TEMPLATE_ID: ${{ secrets.REACT_APP_EMAILJS_TEMPLATE_ID }}
27+
REACT_APP_EMAILJS_PUBLIC_KEY: ${{ secrets.REACT_APP_EMAILJS_PUBLIC_KEY }}
28+
- name: Deploy to GitHub Pages
29+
uses: JamesIves/github-pages-deploy-action@v4
30+
with:
31+
folder: build
32+
branch: gh-pages

0 commit comments

Comments
 (0)