-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.build.yml
50 lines (41 loc) · 1.06 KB
/
.build.yml
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Configuration for builds.sr.ht
image: alpine/edge
packages:
- py-pip
- py3-sphinx
- rsync
secrets:
- beca2c1b-68b8-41e3-81b4-6480fcb1f886
sources:
- https://github.com/WebCampZg/docs
tasks:
- prerequisites: |
sudo pip3 install guzzle_sphinx_theme
- build: |
cd docs
sphinx-build-3 -b html . _build/html
- clone: |
ssh-keyscan -t rsa github.com >> .ssh/known_hosts
git clone [email protected]:WebCampZg/webcampzg.github.io.git
- copy: |
rsync --recursive \
--verbose \
--delete \
--exclude .git \
--exclude .doctrees \
--exclude CNAME \
--exclude README.md \
docs/_build/html/ \
webcampzg.github.io/
- publish: |
cd webcampzg.github.io
git config --local user.email "[email protected]"
git config --local user.name "Publisher"
if [ -n "$(git status --porcelain)" ];
then
git add .
git commit -m "New content"
git push
else
echo "No new content."
fi