File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build TypeScript Project
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+ workflow_dispatch :
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout Repository
18+ uses : actions/checkout@v3
19+
20+ - name : Setup Node.js
21+ uses : actions/setup-node@v3
22+ with :
23+ node-version : 18 # نسخه Node.js را بر اساس پروژه تنظیم کنید
24+ cache : ' npm'
25+
26+ - name : Install Dependencies
27+ run : npm install
28+
29+ - name : Build Project
30+ run : npm run build
31+
32+ - name : Start Application on Port 9000
33+ run : |
34+ npm start &
35+ sleep 5
36+ curl -I http://localhost:9000 || echo "Server did not start!"
37+
38+ - name : Archive Build Artifacts
39+ uses : actions/upload-artifact@v3
40+ with :
41+ name : build-output
42+ path : dist/
You can’t perform that action at this time.
0 commit comments