Skip to content
Snippets Groups Projects
Commit df44730a authored by Bertrand DAVID-JACQUOT's avatar Bertrand DAVID-JACQUOT :lizard:
Browse files

fix: restaure .gitlab-ci.yml et suppr ls(debug), #5

parent baef455b
No related branches found
No related tags found
No related merge requests found
Pipeline #51054 passed
# The Docker image that will be used to build your app
image: pandoc:core
stages:
- build
- deploy
create_htmls:
image:
name: pandoc/core # image docker spécifique à pandoc (ni alpine ni ubuntu serveur n'ont pandoc dans leur dépôt)
entrypoint: ["/bin/sh", "-c"]
artifacts: # récupération des fichiers issue du build pour le déployer au 'stage' deploy
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- ./*.html
- ./textes/*
- ./assets/*.css
- ./assets/icons/*.svg
stage: build
when: manual
script:
- pandoc --version
- echo "converti les pages d'accueil (home, le projet de traduction, comment participer…)"
- pandoc -f markdown textes/home.md > home-part.html
- pandoc -f markdown textes/le-projet-de-traduction.md > le-projet-de-traduction-part.html
- pandoc -f markdown textes/comment-participer.md > comment-participer-part.html
- pandoc -f markdown textes/credits.md > credits-part.html
- pandoc -f markdown textes/mentions-legales.md > mentions-legales-part.html
- pandoc -f markdown textes/contact.md > contact-part.html
- echo "concatène et convertit les entities/e*.md -> entities.html"
# création du sommaire des entités
- grep "^# E" entities/e??.md | sed -f utils/toc-entities.sed > entities-summary.html
# concaténation, conversion markdown -> html et application correction SED (css…) des entitées
- pandoc -f markdown entities/e*.md > entities.html
# création du sommaire des propriétés
- grep "^# P" properties/p???.md | sed -f utils/toc-properties.sed > properties-summary.html
# concaténation et conversion markdown -> html des propriétés
- echo "concatène et convertit les properties/p*.md -> properties.html"
- pandoc -f markdown properties/p*.md > properties.html
# crée la sidebar (menu de gauche) utile à plusieurs pages
- cat html/sidebar-part1.html entities-summary.html html/sidebar-part2.html properties-summary.html html/sidebar-part3.html > sidebar.html
# création des pages d'accueil (home, le projet de traduction, comment participer) du projet
- cat html/index-part1.html sidebar.html html/index-part2.html home-part.html html/footer.html > home.html
- cat html/index-part1.html sidebar.html html/index-part2.html le-projet-de-traduction-part.html html/footer.html > le-projet-de-traduction.html
- cat html/index-part1.html sidebar.html html/index-part2.html comment-participer-part.html html/footer.html > comment-participer.html
- cat html/index-part1.html sidebar.html html/index-part2.html credits-part.html html/footer.html > credits.html
- cat html/index-part1.html sidebar.html html/index-part2.html mentions-legales-part.html html/footer.html > mentions-legales.html
- cat html/index-part1.html sidebar.html html/index-part2.html contact-part.html html/footer.html > contact.html
# création de l'introduction de la traduction (introduction-part.html)
- pandoc -f markdown textes/01_00_introduction.md > introduction-part.html
- cat html/index-part1.html sidebar.html html/index-part2.html introduction-part.html html/footer.html > introduction.html
# création de la page principale (index.html)
- cat html/index-part1.html sidebar.html html/index-part2.html entities.html properties.html html/footer.html > index.html
# applique des modifications pour modifier/ajouter des styles CSS notamment
- sed -f utils/css-tables.sed -i index.html
#- echo "création de la page d'accueil"
#- pandoc --standalone -f markdown index.md > home.html
# suppression des fichiers intermédiaires
- rm *-summary.html
job_show:
#tags: # perment d'utiliser le runner shell
# - shell
# - arar
stage: deploy
when: manual
script:
# avant de copier dedans… il faut les créer… au moins la 1ère fois
- mkdir -p public/cidoc-crm-fr/assets/icons/
# ajoute les fichiers d'assets (CSS, JS… icons svg)
- mv assets/*.css public/cidoc-crm-fr/assets/
- mv assets/*.js public/cidoc-crm-fr/assets/
- mv assets/icons/*.svg public/cidoc-crm-fr/assets/icons/
# màj du .htaccess avec la ré-écriture d'URL
- mv utils/.htaccess public/cidoc-crm-fr/
# déplace les fichiers html dans le répertoire de "production"
- mv index.html home.html le-projet-de-traduction.html comment-participer.html introduction.html credits.html mentions-legales.html contact.html public/cidoc-crm-fr/
# rm sidebar.html
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment