CI/CD: Also deploy tuto3

This commit is contained in:
nemunaire 2022-02-27 12:51:42 +01:00
parent 7b8cc1920e
commit 0df36e72ce

View File

@ -136,6 +136,61 @@ kind: pipeline
type: docker
name: build-tutorial-3-subject
platform:
os: linux
arch: amd64
steps:
- name: compose subject
image: pandoc/latex:2.17.1
commands:
- sed -i s/v3.12/v3.14/ /etc/apk/repositories
- apk add --no-cache make ttf-linux-libertine
- tlmgr update --self
- tlmgr install enumitem environ etoolbox preprint sectsty selnolig tcolorbox titling
- wget -O /tmp/FantasqueSansMono-Normal.tar.gz https://github.com/belluzj/fantasque-sans/releases/download/v1.8.0/FantasqueSansMono-Normal.tar.gz
- mkdir /usr/share/fonts/fantasque-sans-mono
- tar xf /tmp/FantasqueSansMono-Normal.tar.gz -C /usr/share/fonts/fantasque-sans-mono OTF/ TTF/ --strip-component=1
- mkdir dist
- make -C tutorial/ansible
- mv tutorial/ansible/tutorial.pdf dist/tutorial-3-${DRONE_TAG##srs20??-tutorial3-}.pdf
- name: deploy subject
image: appleboy/drone-scp
settings:
tar_tmp_path: /tmp/
host: adlin.nemunai.re
target: /var/www/nemunai.re/adlin/subjects/
source: dist/*
strip_components: 1
username:
from_secret: ssh_username
key:
from_secret: deploy_key
port:
from_secret: ssh_port
- name: link to latest subject
image: appleboy/drone-ssh
settings:
host: adlin.nemunai.re
username:
from_secret: ssh_username
key:
from_secret: deploy_key
port:
from_secret: ssh_port
script:
- ln -sf /var/www/nemunai.re/adlin/subjects/tutorial-3-${DRONE_TAG##srs20??-tutorial3-}.pdf /var/www/nemunai.re/adlin/tutorial-3.pdf
trigger:
ref:
- refs/tags/srs20??-tutorial3-*
---
kind: pipeline
type: docker
name: build-tutorial-3-subject
platform:
os: linux
arch: amd64