diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 68d7323..655960a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,23 +15,10 @@ variables: PORT: 4000 stages: - - prepare - build - test - deploy -# Stage: prepare -############################################################################## - -# Build docker images -prepare:redoc: - stage: prepare - script: - - docker build -f doc/api/Dockerfile -t redoc . - tags: - - shell - - linux - # Stage: build ############################################################################## @@ -58,25 +45,9 @@ build:docker: script: - docker build -t ${DOCKER_IMAGE} . - # Stage: test ############################################################################## -test:apidoc: - stage: test - tags: - - docker - image: redoc - script: - - cd doc/api - - redoc-cli bundle --cdn --title "VILLASweb Backend API Documentation" --output index.html swagger.json - dependencies: - - build:backend - artifacts: - paths: - - doc/api/index.html - - doc/api/swagger.json - test:gotest: stage: test variables: @@ -180,19 +151,3 @@ deploy:docker: tags: - shell - linux - -# deploy:upload: -# stage: deploy -# image: -# name: rclone/rclone:1.50 -# entrypoint: [""] -# before_script: -# - rclone config create fein webdav url ${DEPLOY_PATH} vendor other user ${DEPLOY_USER} pass ${DEPLOY_PASS} -# script: -# - rclone copy --include=index.html --include=swagger.json doc/api fein:villas/api/web -# dependencies: -# - test:apidoc -# only: -# - master -# tags: -# - shell diff --git a/doc/api/Dockerfile b/doc/api/Dockerfile deleted file mode 100644 index 88bfab8..0000000 --- a/doc/api/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM node:8 - -RUN npm -g install redoc-cli diff --git a/doc/api/Makefile b/doc/api/Makefile deleted file mode 100644 index 988ceee..0000000 --- a/doc/api/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -TITLE := "VILLASweb Backend API Documentation" - -DEPLOY_USER ?= deploy -DEPLOY_HOST ?= acs-os-fein-website -DEPLOY_PATH ?= /var/www/villas/api/web/ - -RSYNC_OPTS ?= --recursive --ignore-missing-args --copy-links --chown $(DEPLOY_USER):$(DEPLOY_USER) - -all: index.html - -index.html: swagger.json - redoc-cli bundle --cdn --title $(TITLE) --output $@ swagger.json - -deploy: index.html - rsync $(RSYNC_OPTS) index.html swagger.json $(DEPLOY_USER)@$(DEPLOY_HOST):$(DEPLOY_PATH) - -clean: - rm -rf index.html - -.PHONY: docs clean deploy diff --git a/doc/api/generateapidoc.sh b/doc/api/generateapidoc.sh deleted file mode 100755 index 89cd679..0000000 --- a/doc/api/generateapidoc.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - - -cd ../../ -go mod tidy -swag init -p pascalcase -g "start.go" -o "./doc/api/" -cd - - -redoc-cli bundle --cdn --title "VILLASweb Backend API" --output index.html swagger.json \ No newline at end of file