diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..ff2b3b3abea394f66feaf02fd12895038224bf7b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,52 @@ +stages: + - site-builder + - site-publisher + +.template: &template + stage: site-publisher + image: docker:stable + services: + - docker:dind + dependencies: + - site-builder + script: + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY + - | + docker run \ + --rm \ + -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ + -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ + -e CRI_BUCKET=${CRI_BUCKET} \ + -v $(pwd)/site:/srv/site \ + registry.cri.epita.fr/cri/docker/arch-cri/master \ + aws s3 --endpoint-url https://s3.cri.epita.fr/ sync /srv/site $CRI_BUCKET --acl public-read --delete + +site-builder: + stage: site-builder + image: + name: squidfunk/mkdocs-material:latest + entrypoint: [""] + script: + - mkdocs build + artifacts: + expire_in: 1 days + paths: + - site + +site-publisher:release: + <<: *template + only: + - master + variables: + AWS_SECRET_ACCESS_KEY: $cri_doc_secret + AWS_ACCESS_KEY_ID: $cri_doc_access + CRI_BUCKET: $cri_doc_bucket + +site-publisher:dev: + <<: *template + except: + - master + variables: + AWS_SECRET_ACCESS_KEY: $cri_doc_dev_secret + AWS_ACCESS_KEY_ID: $cri_doc_dev_access + CRI_BUCKET: $cri_doc_dev_bucket diff --git a/README.md b/README.md index e8249c960dc51e4a356ccc8a54e69e5ccf7eaa80..3f38a1edeca95b853ae69a07afeb0bcdae5dd9aa 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,14 @@ The goal of this repository is to store in one place the various documentation regarding the services offered by the CRI to the school and its students. This documentation can be read [here](https://doc.cri.epita.fr). + +You can build the site with: +```bash +mkdocs build +``` + +You can also build and test the site locally with: +```bash +mkdocs serve +``` +The website will be available at localhost:8000 diff --git a/docs/charte.pdf b/docs/charte.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9f2b930c79c48963884b1453268415f2c22ab9cc Binary files /dev/null and b/docs/charte.pdf differ diff --git a/mkdocs.yml b/mkdocs.yml index 22810df13a4c851875eac1793cdace0c96d5bef8..f321ede234cfda17a4b81c321b326fae4f69b6ce 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -18,6 +18,7 @@ nav: - Accounts: - Cri and Bocal accounts: 'accounts.md' - Recover and modify passwords: 'passwords.md' + - Machines Room rules: 'charte.pdf' - Contributing: - 'map_contributing.md' - 'doc_contributing.md'