Skip to content

Commit 77757c8

Browse files
authored
Create deploy.yml
1 parent 43d1400 commit 77757c8

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy React/Vite App to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Build project
25+
run: npm run build
26+
27+
- name: Upload build output
28+
uses: actions/upload-pages-artifact@v3
29+
with:
30+
path: ./dist
31+
32+
deploy:
33+
needs: build
34+
permissions:
35+
pages: write
36+
id-token: write
37+
runs-on: ubuntu-latest
38+
39+
steps:
40+
- name: Deploy to GitHub Pages
41+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)