-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.woodpecker.yml
48 lines (48 loc) · 1.54 KB
/
.woodpecker.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
# Sphinx build
steps:
- name: build-html
image: sphinxdoc/sphinx
when:
event: [ push, pull_request, tag ]
commands:
- cd ./docs
- pip3 install --no-cache-dir -r requirements.txt
- sphinx-build -b html . build -W
- name: build-pdf
image: sphinxdoc/sphinx-latexpdf
when:
event: [ push, pull_request, tag ]
commands:
- cd ./docs
- pip3 install --no-cache-dir -r requirements.txt
- sphinx-build -M latexpdf . build -W
# Based on: https://codeberg.org/gitnex/tea4j-autodeploy/src/branch/main/.woodpecker.yml
- name: deploy
image: alpine/git
when:
event: [ push, tag ]
branch: main
environment:
GIT_AUTHOR_NAME: arubot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMIT_MESSAGE: Synchronization with changes to the ARU
GITEA_HOST: codeberg.org
GITEA_REPOSITORY: ventureo/pages
GITEA_BRANCH: main
GITEA_USERNAME:
from_secret: gitea_username
GITEA_TOKEN:
from_secret: gitea_token
commands:
- git clone https://codeberg.org/ventureo/pages
- cp -r ./docs/build/* pages/
- cd pages
- git config user.name "$${GIT_AUTHOR_NAME}"
- git config user.email "$${GIT_AUTHOR_EMAIL}"
- git checkout "$${GITEA_BRANCH}"
- git add -A
- >
if git commit --message "$${GIT_COMMIT_MESSAGE}"; then
git remote set-url origin "https://$${GITEA_USERNAME}:$${GITEA_TOKEN}@$${GITEA_HOST}/$${GITEA_REPOSITORY}"
git push origin "$${GITEA_BRANCH}" -f
fi