diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 142a1ef..ea40638 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,35 +1,29 @@ image: ruby:2.4.2 -variables: - GEMSPEC: "autonomic.gemspec" - stages: - - quality - - gem-build - - site-build + - build - deploy -quality-assurance: - stage: quality - script: - - echo "TODO!" - -gem-builder: - stage: gem-build - script: - - gem build $GEMSPEC - -site-builder: - stage: site-build +build: + stage: build before_script: - gem install jekyll script: - - jekyll build + - jekyll build -d public artifacts: paths: - - dist + - public -production-deploy: +deploy: stage: deploy + before_script: + - gem install jekyll script: - - echo "TODO!" + - jekyll build -d public + - ./bin/deploy + artifacts: + paths: + - public + # only: + # - master + # - tags diff --git a/README.md b/README.md index f673cc4..4326fc9 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,12 @@ A [Jekyll] based site for the Autonomic Cooperative. The template is based on the [spectral-jekyll-theme]. +We use [autonomic.zone] for production and [autonomic-cooperative.gitlab.io] for staging. + [Jekyll]: https://jekyllrb.com/ [spectral-jekyll-theme]: https://github.com/andrewbanchich/spectral-jekyll-theme +[autonomic.zone]: https://autonomic.zone/ +[autonomic-cooperative.gitlab.io]: http://autonomic-cooperative.gitlab.io/ # Contribute diff --git a/bin/deploy b/bin/deploy new file mode 100755 index 0000000..489514b --- /dev/null +++ b/bin/deploy @@ -0,0 +1,27 @@ +#!/bin/bash + +GITUSERNAME="autonomicgitlabci" +GITUSEREMAIL="autonomicgitlabci@nowhere.com" +DEPLOYSCRIPT="https://github.com/X1011/git-directory-deploy/raw/master/deploy.sh" + +export GIT_DEPLOY_DIR="public" +export GIT_DEPLOY_BRANCH="production" +export GIT_DEPLOY_REPO="git@gitlab.com:autonomic-cooperative/autonomic-cooperative.gitlab.io.git" + +apt-get update -y +apt-get install -yqq wget openssh-client + +wget $DEPLOYSCRIPT && chmod +x deploy.sh + +git config --global user.email $GITUSEREMAIL +git config --global user.name $GITUSERNAME + +mkdir -p ~/.ssh +eval "$(ssh-agent -s)" +ssh-add <(echo "$SSH_PRIVATE_KEY") +echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config + +# ./deploy.sh -m "Git tag: $(git describe --exact-match HEAD)" +./deploy.sh -m "Hello, World!" + +rm -Rfv .ssh diff --git a/proddist/404.html b/proddist/404.html deleted file mode 100644 index 0678624..0000000 --- a/proddist/404.html +++ /dev/null @@ -1,98 +0,0 @@ - - -
-