File: deploy.sh

package info (click to toggle)
iperf3 3.20-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 3,152 kB
  • sloc: ansic: 15,094; sh: 5,300; makefile: 243; python: 134
file content (18 lines) | stat: -rwxr-xr-x 407 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

GIT_URL=`git remote show origin | awk '/Push  URL/ { print $NF }'`
DEPLOY_DIR=/tmp/deploy.$$
mkdir ${DEPLOY_DIR}
(cd ${DEPLOY_DIR} ; \
    git clone ${GIT_URL} . \
 && git checkout gh-pages \
 && git rm -rf .
)
cp -r _build/html/* ${DEPLOY_DIR}
touch ${DEPLOY_DIR}/.nojekyll
(cd ${DEPLOY_DIR} ; \
    git add .nojekyll *  \
    && git commit -m "deploy"  \
    && git push)

rm -rf ${DEPLOY_DIR}