Skip to content

Commit a87cdcd

Browse files
Add script to generate and push docs
1 parent 0d358ca commit a87cdcd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

utils/update_docs.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
if ! hash ghp-import 2>/dev/null; then
4+
echo "This script requires ghp-import from pip"
5+
exit 1
6+
fi
7+
if ! hash cargo 2>/dev/null; then
8+
echo "This script requires cargo"
9+
exit 1
10+
fi
11+
12+
# Generate docs, add redirect, use ghp-import to write gh-pages branch, and push.
13+
echo "Generating docs, prepare for push"
14+
cargo doc \
15+
&& echo '<meta http-equiv=refresh content=0;url=procrs/index.html>' > target/doc/index.html && \
16+
ghp-import -np target/doc

0 commit comments

Comments
 (0)