Skip to content

Commit a9da28a

Browse files
committed
Update ghpages scripts
1 parent 34d2f9d commit a9da28a

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ node_modules/
1515
dist
1616
coverage
1717
__screenshots__
18+
ghpages

package.json

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
"format": "wireit",
2424
"circular": "wireit",
2525
"prepare": "wireit",
26-
"test": "wireit"
26+
"test": "wireit",
27+
"ghpages:build": "wireit",
28+
"ghpages:publish": "wireit",
29+
"ghpages:prepare": "wireit",
30+
"ghpages:generate": "wireit"
2731
},
2832
"dependencies": {
2933
"@lit/localize": "^0.12.2",
@@ -110,6 +114,31 @@
110114
"dependencies": [
111115
"circular"
112116
]
117+
},
118+
"ghpages:build": {
119+
"dependencies": [
120+
"build"
121+
],
122+
"command": "gh-pages -d dist && npm run prepare && vite build"
123+
},
124+
"ghpages:publish": {
125+
"dependencies": [
126+
"ghpages:prepare"
127+
],
128+
"command": "gh-pages:prepare -e $(git branch --show-current)"
129+
},
130+
"ghpages:nojekyll": {
131+
"command": "mkdir -p ghpages && touch ./ghpages/.nojekyll"
132+
},
133+
"ghpages:prepare": {
134+
"dependencies": [
135+
"ghpages:build",
136+
"ghpages:nojekyll",
137+
"ghpages:generate"
138+
]
139+
},
140+
"ghpages:generate": {
141+
"command": "gh-pages -t -d ghpages -m \"Build for $(git log --pretty=format:\"%h %an %ai %s\" -n1) [skip ci]\""
113142
}
114143
}
115144
}

0 commit comments

Comments
 (0)