use makefile to testbuild docs

This commit is contained in:
Robert Kaussow
2020-02-11 15:26:29 +01:00
parent 5c99f9a47c
commit 274dfae24b
3 changed files with 28 additions and 51 deletions

View File

@@ -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',
],
},
{

3
.gitignore vendored
View File

@@ -1,4 +1,5 @@
coverage.out
/bin
/dist
/dist
/hugo

View File

@@ -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: