diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7aa51b0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +book/build \ No newline at end of file diff --git a/.woodpecker/doc-pages.yml b/.woodpecker/doc-pages.yml new file mode 100644 index 0000000..bdb6c68 --- /dev/null +++ b/.woodpecker/doc-pages.yml @@ -0,0 +1,32 @@ +pipeline: + pages: + image: woodpeckerci/plugin-docker-buildx + settings: + output: type=local,dest=public + # do not push, push cannot be used with output simultaneously anyway + dry_run: true + # do not refresh image + pull_image: false + purge: false + + pages-publish: + image: bitnami/git + secrets: [ codeberg_token ] + commands: + - git config --global user.email bot+pages@metacode.biz + - git config --global user.name "Page Renderer" + - git clone -b pages https://$CODEBERG_TOKEN@codeberg.org/openpgp/test.git $CI_REPO_NAME + - cp -ar public/. $CI_REPO_NAME/ + # Needed for custom domains + - cp .domains $CI_REPO_NAME || true # Ignore if it doesn't exist + - cd $CI_REPO_NAME + - > + if [ -z "$(git status --porcelain)" ]; then + echo "No changes" + else + git add . + git commit -m "Update rendered page" -m "Source: $CI_COMMIT_SHA" -m "See: $CI_BUILD_LINK" + git push + fi + when: + event: push diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0ab9423 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM sphinxdoc/sphinx AS build +RUN pip install myst-parser +COPY book/ /book +WORKDIR /book +RUN make html + +FROM scratch +COPY --from=build /book/build/html /