L'URL FINALE == https://bonnebulle.gitlab.io/plain-html-redo Redirige vers = https://plain-html-redo-751743.gitlab.io ( URL Non personelle ) . . . hébergement gratuit ! --- Tuto : Objectif : Cloner un projet initial existant ( clone + url ) Comprendre le versionning + fork ( sauvegarder l'état d'un projet : commit + push ) Revenir dans le temps à un état de sauvegarde passé ( grace à son identifiant unique : hash ) Auto-héberger une page sur GitLab ( gratuit ) Éditer du code ... Le partager et envoyer les dernières modifications : GITLAB permet de travailler sans rien installer ! Il embarque un IDE (éditeur de code accessible en ligne ) On va travailler à partir de cet interface web .... mais on peut aussi... INSTALLER EN LOCAL : + VSCODE / CODIUM : ? https://alternativeto.net/software/codium/ ! https://github.com/Alex313031/codium/releases ( WINDOWS : win32/64 .exe /ou/ MAC : x64/arm64 .dmg ) ! https://code.visualstudio.com/download passer en Francais : https://www.it-connect.fr/tuto-changer-langue-visual-studio-code-francais-anglais/ ? Alt : JETBRAINS IDE https://www.jetbrains.com/webstorm/ MAIS AUSSI : + Terminal : ( utiliser la ligne de commande ) https://openclassrooms.com/fr/courses/6173491-apprenez-a-utiliser-la-ligne-de-commande-dans-un-terminal/6349461-decouvrez-le-terminal#r-6349452 ! Tuto (Anglais) https://coolguy.website/map-is-the-territory/introduction.html + Git : https://git-scm.com/downloads Vérifier via Terminal > git -v --- CREER UN COMPTE GITlab https://gitlab.com/users/sign_up . . . FORK PROJET PAGE D'exemple : https://gitlab.com/pages/plain-html On clic "Fork" On présice la desintaion + nom du projet EX/ https://gitlab.com/bonnebulle/plain-html-redo . . . PAGE ( projet accessible en ligne ) : Dans le projet actuel on veut le transformer en page hébergée par Gitlab -> GAUCHE -> Build > Pipeline -> New Pipeline (boutton bleu) -> Run Pipeline (boutton bleu) PAGE URL == - https://USERNAME.gitlab.io/PROJECT_NAME . . . RETOUR AU PROJET --> Code (boutton bleu) --> Ouvrir avec.... ---> Va ouvrir un IDE... /SI/ on veut cloner+ouvrir le projet en local... ( avec vscode/codium/IDE installé sur l'ordinateur ) Gitlab va proposer de clonner le projet avant de l'ouvrir avec .... /SI/ on veut travailler en ligne (IDE GitLab)... On peut ouvrir un fichier spécifique EX/ https://gitlab.com/bonnebulle/plain-html-redo/-/blob/main/README.md --> Edit (boutton bleu) --> Open in Web IDE... DEPUIS CET IDE, on va pouvoir sauvegarder l'état d'avancement du projet en utilisant GIT ( qui se charge : - de cloner "> clone https://gitlab.com/bonnebulle/plain-html-redo.git" - de télécharger l'état actuel du projet présent sur le serveur git "> git pull" - d'envoyer / sauvegarder "> commit > push" . . . ) --- Example plain HTML site using GitLab Pages. Learn more about GitLab Pages at https://pages.gitlab.io and the official documentation https://docs.gitlab.com/ce/user/project/pages/. --- **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* - [GitLab CI](#gitlab-ci) - [GitLab User or Group Pages](#gitlab-user-or-group-pages) - [Did you fork this project?](#did-you-fork-this-project) - [Troubleshooting](#troubleshooting) ## GitLab CI This project's static Pages are built by [GitLab CI][ci], following the steps defined in [`.gitlab-ci.yml`](.gitlab-ci.yml): ```yml image: busybox pages: stage: deploy script: - echo 'Nothing to do...' artifacts: paths: - public expire_in: 1 day rules: - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH ``` The above example expects to put all your HTML files in the `public/` directory. ## GitLab User or Group Pages To use this project as your user/group website, you will need one additional step: just rename your project to `namespace.gitlab.io`, where `namespace` is your `username` or `groupname`. This can be done by navigating to your project's **Settings**. Read more about [user/group Pages][userpages] and [project Pages][projpages]. ## Did you fork this project? If you forked this project for your own use, please go to your project's **Settings** and remove the forking relationship, which won't be necessary unless you want to contribute back to the upstream project. ## Troubleshooting 1. CSS is missing! That means that you have wrongly set up the CSS URL in your HTML files. Have a look at the [index.html] for an example. [ci]: https://about.gitlab.com/solutions/continuous-integration/ [index.html]: https://gitlab.com/pages/plain-html/-/blob/main/public/index.html [userpages]: https://docs.gitlab.com/ee/user/project/pages/introduction.html#gitlab-pages-in-projects-and-groups [projpages]: https://docs.gitlab.com/ee/user/project/pages/introduction.html#gitlab-pages-in-projects-and-groups