From 376c7da6a487be0bc722efd8c1565caeb8803aa0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Mon, 14 Sep 2020 07:08:51 +0200 Subject: [PATCH] ci: add deploy steps MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Petr Å tetiar --- .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ab97a9d..fdbe77d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,7 @@ include: stages: - pre-build - test + - deploy check HTML, JS, CSS with eslint and prettier: stage: pre-build @@ -89,3 +90,28 @@ test scaned site with selenium: extends: .test site dependencies: - build site for target environment using scan method + +.deploy: + stage: deploy + image: alpine + dependencies: + - build site for target environment using scrape method + before_script: + - apk update && apk add rsync + only: + - master + script: + - rsync -rlptvz build/ "rsync://firmware_selector@mirror-02.infra.openwrt.org/$RSYNC_TARGET/www/" + +deploy to firmware-selector.staging.openwrt.org: + extends: .deploy + variables: + RSYNC_TARGET: firmware-selector-staging-upload + +deploy to firmware-selector.openwrt.org: + extends: .deploy + variables: + RSYNC_TARGET: firmware-selector-upload + when: manual + before_script: + - apk update && apk add rsync -- 2.30.2