8000 #1: add script to update gh-pages · Powercoder64/ffmpeg-python@c556409 · GitHub
[go: up one dir, main page]

Skip to content

Commit c556409

Browse files
committed
kkroening#1: add script to update gh-pages
1 parent 696e52a commit c556409

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

doc/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
doctrees
2+
gh-pages

doc/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ help:
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
2020
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+
22+
23+
gh-pages:
24+
@./update-gh-pages.sh

doc/update-gh-pages.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
CLONE_URL=$(git remote -v | grep origin | head -n1 | awk '{print $2}')
4+
if [ ! -d gh-pages ]; then
5+
git clone -b gh-pages ${CLONE_URL} gh-pages
6+
else
7+
(cd gh-pages && git pull origin gh-pages)
8+
fi
9+
10+
cd gh-pages
11+
rm -rf *
12+
cp -r ../html/* .
13+
git add -A
14+
git commit -m 'Update docs'
15+
git push origin gh-pages

0 commit comments

Comments
 (0)
0