Ajout de la CI woodpecker
This commit is contained in:
parent
0b6d16f0dd
commit
817dc0d00d
1 changed files with 59 additions and 0 deletions
59
.woodpecker.yaml
Normal file
59
.woodpecker.yaml
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
variables:
|
||||||
|
# https://hub.docker.com/r/alpine/git/tags
|
||||||
|
- &GIT_VERSION v2.30.1
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build_tex
|
||||||
|
image: registry.gitlab.com/islandoftex/images/texlive:latest
|
||||||
|
# rules:
|
||||||
|
# - changes:
|
||||||
|
# - "./*.tex"
|
||||||
|
# - "./**/*.tex"
|
||||||
|
commands:
|
||||||
|
- pdflatex --shell-escape article.tex
|
||||||
|
- biber article
|
||||||
|
- pdflatex --shell-escape article.tex
|
||||||
|
- pdflatex --shell-escape --jobname=article-only article.tex
|
||||||
|
- biber article-only
|
||||||
|
- pdflatex --shell-escape --jobname=article-only article.tex
|
||||||
|
- pdflatex --shell-escape --jobname=supplementaries article.tex
|
||||||
|
- biber supplementaries
|
||||||
|
- pdflatex --shell-escape --jobname=supplementaries article.tex
|
||||||
|
- cat article.log
|
||||||
|
- cat article-only.log
|
||||||
|
- cat supplementaries.log
|
||||||
|
|
||||||
|
- name: deploy
|
||||||
|
image: alpine/git:*GIT_VERSION
|
||||||
|
commands:
|
||||||
|
# Clone the repository via HTTPS inside a new directory
|
||||||
|
- git clone "https://${CI_COMMIT_AUTHOR}:${GITLAB_TOKEN}@${CI_REPO_CLONE_URL}" "${CI_COMMIT_SHA}"
|
||||||
|
|
||||||
|
# Set the displayed user with the commits that are about to be made
|
||||||
|
- git config --global user.email "${CI_COMMIT_AUTHOR_EMAIL:-$CI_COMMIT_AUTHOR_EMAIL}"
|
||||||
|
- git config --global user.name "${CI_COMMIT_AUTHOR:-$CI_COMMIT_AUTHOR}"
|
||||||
|
|
||||||
|
- mv *.pdf "${CI_COMMIT_SHA}/"
|
||||||
|
|
||||||
|
# Go to the new directory
|
||||||
|
- cd "${CI_COMMIT_SHA}"
|
||||||
|
- pwd
|
||||||
|
- ls
|
||||||
|
|
||||||
|
# Add all generated files to Git
|
||||||
|
- git add -f *.pdf
|
||||||
|
- git status
|
||||||
|
- |-
|
||||||
|
# Check if we have modifications to commit
|
||||||
|
CHANGES=$(git status --porcelain | wc -l)
|
||||||
|
|
||||||
|
if [ "$CHANGES" -gt "0" ]; then
|
||||||
|
# Show the status of files that are about to be created, updated or deleted
|
||||||
|
git status
|
||||||
|
|
||||||
|
# Commit all changes
|
||||||
|
git commit -m "Built pdf for ${CI_COMMIT_SHA:0:8}"
|
||||||
|
|
||||||
|
# Update the repository and make sure to skip the pipeline create for this commit
|
||||||
|
git push origin "${CI_REPO_DEFAULT_BRANCH}" -o ci.skip
|
||||||
|
fi
|
||||||
Loading…
Add table
Reference in a new issue