Skip to content

Commit 6c4e737

Browse files
committed
Cleanup old build files from gh-pages branch
1 parent 103ee60 commit 6c4e737

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

scripts/publish-docs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
#!/bin/sh
2+
# Clean up dist directory
23
rm -Rf dist/
4+
5+
# Create production build
36
npm run build
7+
8+
# Clean up /tmp
49
rm -Rf /tmp/css-toggle-component
510
mkdir -p /tmp/css-toggle-component
11+
12+
# Copy files to /tmp
613
cp -R dist/* /tmp/css-toggle-component
14+
15+
# Switch to gh-pages
716
git checkout gh-pages
17+
18+
# Cleanup old files
19+
rm css-toggle.*.js styles.*.css *.map
20+
821
cp -R /tmp/css-toggle-component/* ./
922
git add .
1023
git commit -m "Publishing docs for $(git log -1 --pretty=%B)"

0 commit comments

Comments
 (0)