mirror of
https://codeberg.org/openpgp/notes.git
synced 2024-11-23 08:02:05 +01:00
Add CI rendering
This commit is contained in:
parent
bb00bb33fe
commit
e48fb01003
3 changed files with 41 additions and 0 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
||||||
|
book/build
|
32
.woodpecker/doc-pages.yml
Normal file
32
.woodpecker/doc-pages.yml
Normal file
|
@ -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
|
8
Dockerfile
Normal file
8
Dockerfile
Normal file
|
@ -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 /
|
Loading…
Reference in a new issue