diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..0109dbb9fcd0fb2073e2368ad347fe5fe1876c70 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +chaines_caracteres.html +chaines_caracteres.pdf diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..78715399336ee380c33c822c1d1d2994beb79b13 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,48 @@ +image: omalaspinas/pandoc:latest + +variables: + GIT_SUBMODULE_STRATEGY: recursive + + +before_script: + ## + ## Run ssh-agent (inside the build environment) + ## + - eval $(ssh-agent -s) + + ## + ## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store + ## We're using tr to fix line endings which makes ed25519 keys work + ## without extra base64 encoding. + ## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556 + ## + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null + + ## + ## Create the SSH directory and give it the right permissions + ## + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + + ## + ## Add host id to known_hosts + ## + - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + + + +build_only: + script: + - make + - make deploy + - rsync -avz prog_seq_c_tp malaspinas@129.194.185.180:/www/ + +build_artifacts: + script: + - make + artifacts: + paths: + - "*.pdf" + only: + - tags diff --git a/Makefile b/Makefile index 2c754ebfe296573db9136bce18b0373f728f5c96..233f956914f3fdb62690bc0efc5258a537cbbd26 100644 --- a/Makefile +++ b/Makefile @@ -26,12 +26,9 @@ all: $(HTML) $(PDF) pandoc -s $(OPTIONS) $(HTMLOPTIONS) -o $@ $< deploy: all - mkdir -p prog_seq_c_tp/tableaux_unidimensionnels - cp tableaux_unidimensionnels.html prog_seq_c_tp/tableaux_unidimensionnels/index.html - cp tableaux_unidimensionnels.pdf prog_seq_c_tp/tableaux_unidimensionnels/tableaux_unidimensionnels.pdf - tar czvf gfx_example.tar.gz gfx_example - mv gfx_example.tar.gz prog_seq_c_tp/tableaux_unidimensionnels/ - + mkdir -p prog_seq_c_tp/chaines_caracteres + cp chaines_caracteres.html prog_seq_c_tp/chaines_caracteres/index.html + cp chaines_caracteres.pdf prog_seq_c_tp/chaines_caracteres/chaines_caracteres.pdf clean: rm -rf *.html *.pdf prog_seq_c_tp diff --git a/chaines_de_caracteres.md b/chaines_caracteres.md similarity index 100% rename from chaines_de_caracteres.md rename to chaines_caracteres.md