.woodpecker.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. variables:
  2. - &alpine_image 'docker.io/alpine:3.19'
  3. - path: &docs_path
  4. - 'doc/**'
  5. steps:
  6. docker-build-image:
  7. image: woodpeckerci/plugin-docker-buildx
  8. settings:
  9. dockerfile: Dockerfile
  10. repo: vnpower/pixivfe
  11. username:
  12. from_secret: DOCKER_USERNAME
  13. password:
  14. from_secret: DOCKER_PASSWORD
  15. auto_tag: true
  16. when:
  17. branch: [ v2 ]
  18. event: [ tag, release, manual ]
  19. generate-docs:
  20. image: woodpeckerci/plugin-mkdocs:latest
  21. settings:
  22. verbose: true
  23. pip_install_file: doc/requirements.txt
  24. when:
  25. branch: [ v2 ]
  26. path: *docs_path
  27. event: [ push, tag, release, manual ]
  28. deploy-docs-cloudflare:
  29. image: *alpine_image
  30. environment:
  31. CLOUDFLARE_ACCOUNT_ID:
  32. from_secret: CLOUDFLARE_ACCOUNT_ID
  33. CLOUDFLARE_API_TOKEN:
  34. from_secret: CLOUDFLARE_API_TOKEN
  35. commands:
  36. - apk add npm --repository https://dl-cdn.alpinelinux.org/alpine/edge/community/
  37. - npx wrangler pages deploy site --project-name=pixivfe-docs
  38. when:
  39. branch: [ v2 ]
  40. path: *docs_path
  41. event: [ push, tag, release, manual ]