diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d97a8a8d29e0dd0c87732c38c45dcbd1d69a8efd..1d8b9d281130ffcaefd214f1dabec92bbd5e977f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,38 +3,30 @@ cache: - ./site stages: - - configure - build - deploy -configure-certs: - stage: configure - script: - - make configure - -build-mkdocs: +build-docs: stage: build - needs: - - configure-certs script: - - make build + - make build-docs deploy-docs: stage: deploy needs: - - build-mkdocs + - build-docs only: refs: - master script: - - make deploy + - make deploy-docs deploy-dockerhub-docs: stage: deploy needs: - - build-mkdocs + - build-docs only: refs: - master script: - - DOCKER_USERNAME="${DOCKER_USERNAME}" DOCKER_PASSWORD="${DOCKER_PASSWORD}" make docs + - DOCKER_USERNAME="${DOCKER_USERNAME}" DOCKER_PASSWORD="${DOCKER_PASSWORD}" make deploy deploy-dockerhub-docs diff --git a/Makefile b/Makefile index 780f556a2d955e68381e362768e5320e76ccfb3a..e22a95d71c088ccf50a7ce04a55ac6e86277c811 100644 --- a/Makefile +++ b/Makefile @@ -2,31 +2,26 @@ TAG ?= latest -all: build +all: build-docs clean: rm -rf ./site -release: release-dockerhub - -release-dockerhub: +deploy-dockerhub-docs: sudo pip3 install -r ./requirements.txt python3 ./dockerhub/release.py verify: sudo nginx -t -build: +build-docs: mkdocs build cd ./swagger && bash ./generate.sh build-swagger: cd ./swagger && UPDATE=1 ./generate.sh -configure: - sudo certbot certonly --standalone --preferred-challenges http -d dbrepo-docs.ossdip.at --agree-tos --keep-until-expiring - -deploy: build +deploy-docs: build-docs tar czfv ./site.tar.gz ./site scp ./site.tar.gz ec-thoas2:site.tar.gz ssh ec-thoas2 "rm -rf /system/user/ifs/infrastructures/public_html/dbrepo/*; tar xzfv ./site.tar.gz; rm -f ./site.tar.gz; cp -r ./site/* /system/user/ifs/infrastructures/public_html/dbrepo; rm -rf ./site"