diff --git a/.drone.star b/.drone.star index a56c99e3cc..5412246748 100644 --- a/.drone.star +++ b/.drone.star @@ -622,65 +622,26 @@ def website(ctx): }, 'steps': [ { - 'name': 'clone-downstream', - 'image': 'plugins/git-action:1', - 'pull': 'always', - 'settings': { - 'actions': [ - 'clone', - ], - 'remote': 'https://github.com/owncloud/owncloud.github.io', - 'branch': 'source', - 'path': '/drone/src/downstream/', - 'netrc_machine': 'github.com', - 'netrc_username': { - 'from_secret': 'github_username', - }, - 'netrc_password': { - 'from_secret': 'github_token', - }, - }, - 'when': { - 'ref': { - 'exclude': [ - 'refs/heads/master', - ], - }, - }, - }, - { - 'name': 'copy-current-docs', - 'image': 'webhippie/golang:1.13', - 'pull': 'always', + 'name': 'prepare', + 'image': 'alpine', 'commands': [ - 'cd downstream', - 'mkdir -p content/extensions/ocis-accounts', - 'rsync -aX ../docs/* content/extensions/ocis-accounts', + 'apk add make', + 'make docs-copy' ], }, { - 'name': 'assets', - 'image': 'byrnedo/alpine-curl', - 'commands': [ - 'cd downstream', - 'mkdir -p themes/hugo-geekdoc/', - 'curl -L https://github.com/xoxys/hugo-geekdoc/releases/download/v0.1.7/hugo-geekdoc.tar.gz | tar -xz -C themes/hugo-geekdoc/ --strip-components=1' - ], - }, - { - 'name': 'build-docs', + 'name': 'test', 'image': 'klakegg/hugo:0.59.1-ext-alpine', 'commands': [ - 'cd downstream', + 'cd hugo', 'hugo-official', ], }, { - 'name': 'list-docs', + 'name': 'list', 'image': 'iankoulski/tree', 'commands': [ - 'cd downstream', - 'tree public', + 'tree hugo/public', ], }, { diff --git a/.gitignore b/.gitignore index 8eaa5285f7..299a09c29e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ coverage.out /bin -/dist \ No newline at end of file +/dist +/hugo diff --git a/Makefile b/Makefile index 2c01995bba..0dc6edfd12 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ NAME := ocis-accounts IMPORT := github.com/owncloud/$(NAME) BIN := bin DIST := dist +HUGO := hugo ifeq ($(OS), Windows_NT) EXECUTABLE := $(NAME).exe @@ -57,7 +58,7 @@ sync: .PHONY: clean clean: go clean -i ./... - rm -rf $(BIN) $(DIST) + rm -rf $(BIN) $(DIST) $(HUGO) .PHONY: fmt fmt: @@ -130,9 +131,23 @@ release-check: .PHONY: release-finish release-finish: release-copy release-check +.PHONY: docs-copy +docs-copy: + mkdir -p $(HUGO); \ + cd $(HUGO); \ + git init; \ + git remote rm origin; \ + git remote add origin https://github.com/owncloud/owncloud.github.io; \ + git fetch; \ + git checkout origin/source -f; \ + rsync -aX ../docs/* content/extensions/ocis-accounts + +.PHONY: docs-build +docs-build: + cd $(HUGO); hugo + .PHONY: docs -docs: - cd docs; hugo +docs: docs-copy docs-build .PHONY: watch watch: