From 25a6cd391f2fe0d57028be407aebc0ce89fbaba6 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Sun, 8 Aug 2021 22:29:48 +0200 Subject: [PATCH] Trying automated building. --- ci/dev.config.yml | 72 +++++++++++++++++++++++++++++++++++++++++++++++ ci/drone.yml | 44 +++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 ci/dev.config.yml create mode 100644 ci/drone.yml diff --git a/ci/dev.config.yml b/ci/dev.config.yml new file mode 100644 index 0000000..6fe3029 --- /dev/null +++ b/ci/dev.config.yml @@ -0,0 +1,72 @@ +baseURL: https://dev.ad5001.eu +languageCode: en +title: Ad5001 +theme: Omegamma +copyright: Copyright © Ad5001 2021 +enableGitInfo: "true" + +frontmatter: + date: ["date", "publishDate", "lastmod"] + lastmod: [":git", "date", "publishDate"] + +params: + brandWebsite: / + websiteSource: https://git.ad5001.eu/Ad5001/ad5001.eu + poweredBy: Powered by + +languages: + en: + languageName: English + menu: + main: + - identifier: apps + name: Apps + pre: + title: apps section + url: https://apps.ad5001.eu/ + weight: 20 + - identifier: git + name: Git + pre: + title: git section + url: https://git.ad5001.eu + weight: 10 + - identifier: about + name: About + pre: + title: about section + url: /about + weight: 0 + weight: 0 + fr: + languageName: Français + menu: + main: + - identifier: apps + name: Apps + pre: + title: apps list section + url: https://apps.ad5001.eu/fr/ + weight: 20 + - identifier: git + name: Git + pre: + title: git section + url: https://git.ad5001.eu + weight: 10 + - identifier: about + name: À propos + pre: + title: about section + url: /fr/a-propos + weight: 0 + weight: 0 + +markup: + goldmark: + renderer: + hardWraps: false + unsafe: true + xhtml: false + + diff --git a/ci/drone.yml b/ci/drone.yml new file mode 100644 index 0000000..9a07cfd --- /dev/null +++ b/ci/drone.yml @@ -0,0 +1,44 @@ +kind: pipeline +type: ssh +name: default + +server: + host: + from_secret: SSH_HOST + user: + from_secret: SSH_USERNAME + password: + from_secret: SSH_PASSWORD + +steps: +- name: Deploy on dev.ad5001.eu + environment: + DEV_WWW_PATH: + from_secret: DEV_WWW_PATH + commands: + - cd "$DEV_WWW_PATH" + - git pull + - cd themes/Omegamma + - git pull + - cd ../.. + - rm -rf public + - hugo --config ci/dev.config.yml + when: + event: [ push, tag ] + branch: [ master ] + +- name: Deploy on ad5001.eu + environment: + DEV_WWW_PATH: + from_secret: DEV_WWW_PATH + commands: + - cd "$PROD_WWW_PATH" + - git pull + - cd themes/Omegamma + - git pull + - cd ../.. + - rm -rf public + - hugo + when: + event: [ push, tag ] + branch: [ prod ]