File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : React CI with Vite
2+
3+ on :
4+ push :
5+ branches : [ "dev" ]
6+
7+ permissions :
8+ contents : read
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Set up Node.js
15+ uses : actions/setup-node@v3
16+ with :
17+ node-version : ' 16' # 원하는 Node.js 버전으로 변경
18+
19+ - name : Build and Run Docker on Server
20+ uses : appleboy/ssh-action@master
21+ with :
22+ host : ${{ secrets.HOST }}
23+ username : ${{ secrets.USERNAME }}
24+ key : ${{ secrets.PRIVATE_KEY }}
25+ port : ${{ secrets.PORT }}
26+
27+ - name : Pull latest code from dev branch
28+ run : |
29+ cd /home/ubuntu/react
30+ git pull origin dev
31+
32+ - name : Install dependencies
33+ run : |
34+ npm install
35+
36+ - name : Build React app using Vite
37+ run : |
38+ npm run build
You can’t perform that action at this time.
0 commit comments