-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpublish-docs.sh
More file actions
executable file
·27 lines (23 loc) · 758 Bytes
/
publish-docs.sh
File metadata and controls
executable file
·27 lines (23 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
# Copyright (c) The partial-io Contributors
# SPDX-License-Identifier: MIT
# stop running if any of these steps fail
set -e
pushd ..
if test ! -d partial-io-gh-pages ; then
git clone -b gh-pages git@github.com:sunshowers-code/partial-io.git partial-io-gh-pages
fi
cd partial-io-gh-pages
git checkout --
git clean -dfx
git fetch
git rebase origin/gh-pages
popd
cargo doc --lib --features 'tokio quickcheck' --no-deps
rsync -aH --delete target/doc/ --exclude .git ../partial-io-gh-pages
# cargo doc doesn't write an index file by default
echo '<meta http-equiv=refresh content=0;url=partial_io/index.html>' > ../partial-io-gh-pages/index.html
pushd ../partial-io-gh-pages
git add --all
git commit -m "update website"
git push origin gh-pages