-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
39 lines (39 loc) · 1.39 KB
/
.gitlab-ci.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
pages:
image: debian:bullseye-slim
variables:
SSH_KEY: /root/.ssh/id_ed25519
GIT_SSH_COMMAND: "/usr/bin/ssh -i $SSH_KEY"
DEBIAN_FRONTEND: noninteractive
LANG: C.UTF-8
before_script:
- echo Etc/UTC > /etc/timezone
- echo 'APT::Install-Recommends "0";'
'APT::Install-Suggests "0";'
'APT::Get::Assume-Yes "true";'
'Acquire::Retries "20";'
'Dpkg::Use-Pty "0";'
'quiet "1";'
>> /etc/apt/apt.conf.d/99gitlab
- apt-get update
- apt-get dist-upgrade
script:
- apt-get install git openssh-client pandoc python3-apt python3-debian python3-requests
- ./log.py
- test -d public || mkdir public
- cp *.json public/
- pandoc --standalone README.md > public/index.html
- git diff
- git config user.name "$CI_PIPELINE_ID/$CI_JOB_ID"
- git config user.email $CI_PROJECT_PATH@f-droid.org
- git checkout -B autocommit
- git add sha256/*.sha256 *.json
- git commit sha256/*.sha256 *.json -m "From $CI_PROJECT_URL/-/jobs/$CI_JOB_ID" || exit 0
- mkdir -pvm 0700 $(dirname $SSH_KEY)
- cp .known_hosts $(dirname $SSH_KEY)/known_hosts
- echo $DEPLOY_KEY | base64 --decode > $SSH_KEY
- chmod 0400 $SSH_KEY
- git remote set-url --push origin "git@${CI_SERVER_HOST}:${CI_PROJECT_PATH}.git"
- git push origin autocommit:$CI_COMMIT_REF_NAME
artifacts:
paths:
- public