Commit 10dea62b authored by Quentin Duchemin's avatar Quentin Duchemin

Add SFTP upload

parent a6bd8dc3
Pipeline #54255 passed with stages
in 40 seconds
stages:
- build
# - deploy
- deploy
beamer-build:
image: aergus/latex
......@@ -10,26 +10,18 @@ beamer-build:
artifacts:
paths:
- "*.pdf"
tags:
- docker
tags: [build]
synchronize:
image: debian:stable-slim
stage: deploy
before_script:
- apt-get update -y
- apt-get install -y openssh-client sshpass
script:
- sshpass -p ${SFTP_PASSWORD} sftp -o StrictHostKeyChecking=no -P 2222 ${SFTP_USER}@${SFTP_HOST}:uploads <<< $'mkdir api\n cd api\n put *.pdf git.pdf'
dependencies:
- beamer-build
tags: [build]
only:
- master
# synchronize:
# stage: deploy
# before_script:
# - apt-get update -y
# - apt-get install -y rsync
# - echo "$ssh_key" > id_rsa
# - chmod 600 id_rsa
# script:
# # In non-interactive context, don't chesck host identity
# - rsync -e"ssh -i id_rsa -o StrictHostKeyChecking=no" -avz *.pdf apiInit@pica02.picasoft.net:~/artefact/intro/
# after_script:
# - rm id_rsa
# dependencies:
# - beamer-build
# tags:
# - linux
# only:
# - master
......@@ -2,4 +2,8 @@
Introduction à l'API.
Le document au format PDF est disponible [ici](https://gitlab.utc.fr/picasoft/apis/init/intro/-/jobs/artifacts/master/raw/main.pdf?job=beamer-build).
Une chaîne d'intégration permet de construire automatiquement le PDF à partir du fichier .tex présent à la racine.
Après construction (uniquement sur la branche `master`), le document final est disponible [à cette adresse](https://uploads.picasoft.net/api/intro.pdf).
Le chemin d'upload est défini dans le fichier [.gitlab-ci.yml](./gitlab-ci.yml).
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment