split-packages.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. name: 'Package Splitter'
  2. on:
  3. push:
  4. branches:
  5. - main
  6. env:
  7. GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
  8. jobs:
  9. packages_split:
  10. runs-on: ubuntu-latest
  11. strategy:
  12. fail-fast: false
  13. matrix:
  14. # define package to repository map
  15. package:
  16. - local_path: 'markdown-slides'
  17. split_repository: 'starter-hugo-markdown-slides'
  18. - local_path: 'blog'
  19. split_repository: 'hugo-blog-theme'
  20. - local_path: 'documentation'
  21. split_repository: 'hugo-documentation-theme'
  22. - local_path: 'portfolio'
  23. split_repository: 'starter-hugo-portfolio-theme'
  24. - local_path: 'course'
  25. split_repository: 'starter-hugo-online-course'
  26. steps:
  27. - uses: actions/checkout@v2
  28. # step if no tag is pushed
  29. - if: "!startsWith(github.ref, 'refs/tags/')"
  30. uses: "symplify/monorepo-split-github-action@2.1"
  31. with:
  32. # ↓ split "packages/<package-name><package-name>" directory
  33. package_directory: 'starters/${{ matrix.package.local_path }}'
  34. # ↓ into https://github.com/wowchemy/<package-name> repository
  35. repository_organization: 'wowchemy'
  36. repository_name: '${{ matrix.package.split_repository }}'
  37. # ↓ the user signed under the split commit
  38. user_name: "Splitter Bot"
  39. user_email: "no.reply@wowchemy.com"