File tree Expand file tree Collapse file tree 2 files changed +62
-0
lines changed
Expand file tree Collapse file tree 2 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ concurrency :
15+ group : " pages"
16+ cancel-in-progress : false
17+
18+ jobs :
19+ build :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout
23+ uses : actions/checkout@v4
24+
25+ - name : Setup Node.js
26+ uses : actions/setup-node@v4
27+ with :
28+ node-version : ' 20'
29+ cache : ' npm'
30+
31+ - name : Install dependencies
32+ run : npm ci
33+
34+ - name : Build project
35+ run : npm run build
36+
37+ - name : Prepare deployment directory
38+ run : |
39+ mkdir -p _site
40+ cp index.html _site/
41+ cp -r build _site/
42+ cp -r textures _site/
43+
44+ - name : Setup Pages
45+ uses : actions/configure-pages@v4
46+
47+ - name : Upload artifact
48+ uses : actions/upload-pages-artifact@v3
49+ with :
50+ path : ' _site'
51+
52+ deploy :
53+ environment :
54+ name : github-pages
55+ url : ${{ steps.deployment.outputs.page_url }}
56+ runs-on : ubuntu-latest
57+ needs : build
58+ steps :
59+ - name : Deploy to GitHub Pages
60+ id : deployment
61+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 11node_modules
22.git
33build
4+ _site
You can’t perform that action at this time.
0 commit comments