From 1b22a82b8a27021c653ed2a055a6e0980aa9a2bc Mon Sep 17 00:00:00 2001 From: obaz <obaz@autistici.org> Date: Tue, 7 Apr 2020 15:06:21 +0200 Subject: [PATCH] moved commands to script section --- src/docs/web/webdav.en.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/docs/web/webdav.en.md b/src/docs/web/webdav.en.md index 3edc7c9..b4b8e9c 100644 --- a/src/docs/web/webdav.en.md +++ b/src/docs/web/webdav.en.md @@ -209,14 +209,11 @@ tool to upload your website through Gitlab's continuous integration. To do so, you will need to add the following lines to your `.gitlab-ci.yml` file: -1. You will need pip3 to be installed in your runner, so if python3-pip doesn't come installed by default in the Docker image you're using in your `.gitlab-ci.yml` script, you will need to install it in the `before-script` section of the file: +1. You will need pip3 to be installed in your runner, so if python3-pip doesn't come installed by default in the Docker image you're using in your `.gitlab-ci.yml` script, you will need to install it first thing. Assuming you're using a Debian image, this would be the first command in your script: -``` - before_script: - apt-get update -y && apt-get install -yq python3-pip -``` -1. install webdav_upload in your runner with the following command: +1. Install webdav_upload in your runner with the following command: pip3 install git+https://git.autistici.org/ai3/tools/webdav-upload#egg=webdav_upload @@ -237,13 +234,12 @@ What follows is an example of a full script: ``` production: stage: deploy - before_script: - - apt-get update -y && apt-get install -yq python3-pip script: + - apt-get update -y && apt-get install -yq python3-pip + - pip3 install git+https://git.autistici.org/ai3/tools/webdav-upload#egg=webdav_upload - jekyll build -d output # we assume you are building your website with jekyll and the # output is stored in a folder called `output` - but you can use # whatever system you prefer to build your website - - pip3 install git+https://git.autistici.org/ai3/tools/webdav-upload#egg=webdav_upload - webdav-upload --user="$WEBDAV_USER" --password="$WEBDAV_PASSWORD" --url "https://www.autistici.org/dav/$WEBDAV_USER/" output-folder html-yourwebsite ``` \ No newline at end of file -- GitLab