.woodpecker.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. variables:
  2. - &alpine_image 'docker.io/alpine:3.19'
  3. - path: &docs_path
  4. include: ['doc/**', 'mkdocs.yml']
  5. steps:
  6. docker-build-image:
  7. image: woodpeckerci/plugin-docker-buildx:latest
  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. - event: push
  26. path: *docs_path
  27. branch: [ v2 ]
  28. - event: [ tag, release, manual ]
  29. deploy-docs-cloudflare:
  30. image: *alpine_image
  31. environment:
  32. CLOUDFLARE_ACCOUNT_ID:
  33. from_secret: CLOUDFLARE_ACCOUNT_ID
  34. CLOUDFLARE_API_TOKEN:
  35. from_secret: CLOUDFLARE_API_TOKEN
  36. commands:
  37. - apk add npm --repository https://dl-cdn.alpinelinux.org/alpine/edge/community/
  38. - npx wrangler pages deploy site --project-name=pixivfe-docs
  39. when:
  40. - event: push
  41. path: *docs_path
  42. branch: [ v2 ]
  43. - event: [ tag, release, manual ]
  44. depends_on:
  45. - generate-docs