build.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. name: "Build Repository with Maven"
  2. on:
  3. workflow_dispatch:
  4. push:
  5. branches:
  6. - main
  7. # @see about pricing https://docs.github.com/ja/billing/managing-billing-for-github-actions/about-billing-for-github-actions#included-storage-and-minutes
  8. jobs:
  9. build-maven:
  10. runs-on: ubuntu-latest
  11. # @see https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
  12. permissions:
  13. contents: read
  14. id-token: write
  15. pages: write
  16. steps:
  17. - uses: actions/checkout@v3
  18. - uses: actions/setup-java@v3
  19. with:
  20. java-version: '17'
  21. distribution: 'liberica'
  22. cache: maven
  23. - name: Build with Maven
  24. run: mvn -B clean package --file pom.xml
  25. # publish GitHub Pages(require public repository)
  26. - name: Setup Pages
  27. uses: actions/configure-pages@v3
  28. - name: Upload artifact
  29. uses: actions/upload-pages-artifact@v2
  30. with:
  31. path: './target/generated-docs/'
  32. # you can access at https://kiyota-tagbangers.github.io/problem-json/
  33. - name: Deploy to GitHub Pages
  34. id: deployment
  35. uses: actions/deploy-pages@v2