.woodpecker.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Sphinx build
  2. steps:
  3. - name: build-html
  4. image: sphinxdoc/sphinx
  5. when:
  6. event: [ push, pull_request, tag ]
  7. commands:
  8. - cd ./docs
  9. - pip3 install --no-cache-dir -r requirements.txt
  10. - sphinx-build -b html . build -W
  11. - name: build-pdf
  12. image: sphinxdoc/sphinx-latexpdf
  13. when:
  14. event: [ push, pull_request, tag ]
  15. commands:
  16. - cd ./docs
  17. - pip3 install --no-cache-dir -r requirements.txt
  18. - sphinx-build -M latexpdf . build -W
  19. # Based on: https://codeberg.org/gitnex/tea4j-autodeploy/src/branch/main/.woodpecker.yml
  20. - name: deploy
  21. image: alpine/git
  22. when:
  23. event: [ push, tag ]
  24. branch: main
  25. environment:
  26. GIT_AUTHOR_NAME: arubot
  27. GIT_AUTHOR_EMAIL: arubot@noreply.codeberg.org
  28. GIT_COMMIT_MESSAGE: Synchronization with changes to the ARU
  29. GITEA_HOST: codeberg.org
  30. GITEA_REPOSITORY: ventureo/pages
  31. GITEA_BRANCH: main
  32. GITEA_USERNAME:
  33. from_secret: gitea_username
  34. GITEA_TOKEN:
  35. from_secret: gitea_token
  36. commands:
  37. - git clone https://codeberg.org/ventureo/pages
  38. - cp -r ./docs/build/* pages/
  39. - cd pages
  40. - git config user.name "$${GIT_AUTHOR_NAME}"
  41. - git config user.email "$${GIT_AUTHOR_EMAIL}"
  42. - git checkout "$${GITEA_BRANCH}"
  43. - git add -A
  44. - >
  45. if git commit --message "$${GIT_COMMIT_MESSAGE}"; then
  46. git remote set-url origin "https://$${GITEA_USERNAME}:$${GITEA_TOKEN}@$${GITEA_HOST}/$${GITEA_REPOSITORY}"
  47. git push origin "$${GITEA_BRANCH}" -f
  48. fi