123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- # Sphinx build
- pipeline:
- build-html:
- image: archlinux:base-devel
- commands:
- - pacman-key --init
- - pacman -Syu --noconfirm
- - pacman -S --noconfirm git python-sphinx python-pip ttf-dejavu python-sphinx-copybutton
- - pip install --upgrade pip
- - pip install --upgrade pydata-sphinx-theme
- - cd ./docs
- - sphinx-build -b html . build -W
- when:
- branch: main
- build-pdf:
- image: archlinux:base-devel
- commands:
- - pacman-key --init
- - pacman -Syu --noconfirm
- - pacman -S --noconfirm texlive-latexextra texlive-fontsextra git texlive-core python-sphinx ttf-dejavu python-sphinx-copybutton
- - cd ./docs
- - sphinx-build -M latexpdf . build -W
- when:
- branch: main
- # Based on: https://codeberg.org/gitnex/tea4j-autodeploy/src/branch/main/.woodpecker.yml
- deploy:
- image: alpine/git
- environment:
- # Information that should be used when authoring a commit
- - GIT_AUTHOR_NAME=arubot
- - GIT_AUTHOR_EMAIL=arubot@noreply.codeberg.org
- - GIT_COMMIT_MESSAGE=Synchronization with changes to the ARU
- # Basic information concerning the repo that
- - GITEA_HOST=codeberg.org
- - GITEA_REPOSITORY=ventureo/pages
- - GITEA_BRANCH=main
- # Username and token that should be used to authenticate against the gitea instance
- # - GITEA_USERNAME=secret
- # - GITEA_TOKEN=secret
- secrets: [ gitea_username, gitea_token ]
- commands:
- # Setup git credentials and checkout target branch
- - git clone https://codeberg.org/ventureo/pages
- - cp -r ./docs/build/* pages/
- - cd pages
- - git config user.name "$${GIT_AUTHOR_NAME}"
- - git config user.email "$${GIT_AUTHOR_EMAIL}"
- - git checkout "$${GITEA_BRANCH}"
- # Stage all important files for commit
- - git add -A
- # If files have changed, create a new commit and push it to the branch this pipeline was started on
- - >
- if git commit --message "$${GIT_COMMIT_MESSAGE}"; then
- git remote set-url origin "https://$${GITEA_USERNAME}:$${GITEA_TOKEN}@$${GITEA_HOST}/$${GITEA_REPOSITORY}"
- git push origin "$${GITEA_BRANCH}"
- fi
- when:
- branch: main
- event: [ push, tag ]
|