From: Petr Štetiar Date: Mon, 14 Sep 2020 05:08:51 +0000 (+0200) Subject: ci: add deploy steps X-Git-Tag: v3.0.0~2 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=376c7da6a487be0bc722efd8c1565caeb8803aa0;p=web%2Ffirmware-selector-openwrt-org.git ci: add deploy steps Signed-off-by: Petr Štetiar --- 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