File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # .github/workflows/build.yml
2+ name : Build and Deploy
3+
4+ on :
5+ push :
6+ branches :
7+ - vite
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout vite branch
15+ uses : actions/checkout@v3
16+ with :
17+ fetch-depth : 0
18+
19+ - name : Set up Node.js
20+ uses : actions/setup-node@v3
21+ with :
22+ node-version : 20.19.0
23+
24+ - name : Install dependencies
25+ run : yarn install --frozen-lockfile
26+
27+ - name : Build project
28+ run : yarn run build
29+
30+ - name : Deploy dist to build branch
31+ run : |
32+ git config user.name "github-actions[bot]"
33+ git config user.email "github-actions[bot]@users.noreply.github.com"
34+
35+ cd dist
36+
37+ git init
38+ git config user.name "github-actions[bot]"
39+ git config user.email "github-actions[bot]@users.noreply.github.com"
40+
41+ git remote add origin https://github.com/${{ github.repository }}.git
42+ git checkout -b build || git checkout build
43+
44+ git add .
45+ git commit -m "Deploy to build from ${GITHUB_SHA}" || echo "Nothing to commit"
46+ git push origin build --force
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ node_modules
1111dist
1212dist-ssr
1313* .local
14+ tsconfig.tsbuildinfo
1415
1516# Editor directories and files
1617.vscode /*
Original file line number Diff line number Diff line change 272272 </ div >
273273 </ template >
274274
275- < script src ="./src/main .ts " type ="module "> </ script >
275+ < script src ="./src/Main .ts " type ="module "> </ script >
276276</ html >
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments