ci-pdf-converter.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. name: Node CI for pdf-converter
  2. on:
  3. push:
  4. branches-ignore:
  5. - release/**
  6. - rc/**
  7. - support/prepare-v**
  8. paths:
  9. - .github/mergify.yml
  10. - .github/workflows/ci-pdf-converter.yml
  11. - biome.json
  12. - tsconfig.base.json
  13. - turbo.json
  14. - pnpm-lock.yaml
  15. - package.json
  16. - apps/pdf-converter/**
  17. - '!apps/pdf-converter/docker/**'
  18. concurrency:
  19. group: ${{ github.workflow }}-${{ github.ref }}
  20. cancel-in-progress: true
  21. jobs:
  22. ci-pdf-converter-lint:
  23. runs-on: ubuntu-latest
  24. strategy:
  25. matrix:
  26. node-version: [24.x]
  27. steps:
  28. - uses: actions/checkout@v4
  29. - uses: pnpm/action-setup@v4
  30. - uses: actions/setup-node@v4
  31. with:
  32. node-version: ${{ matrix.node-version }}
  33. cache: 'pnpm'
  34. - name: Install dependencies
  35. run: |
  36. pnpm add turbo --global
  37. pnpm install --frozen-lockfile
  38. - name: Lint
  39. run: |
  40. turbo run lint --filter=@growi/pdf-converter
  41. - name: Slack Notification
  42. uses: weseek/ghaction-slack-notification@master
  43. if: failure()
  44. with:
  45. type: ${{ job.status }}
  46. job_name: '*Node CI for growi-pdf-converter - test (${{ matrix.node-version }})*'
  47. channel: '#ci'
  48. isCompactMode: true
  49. url: ${{ secrets.SLACK_WEBHOOK_URL }}
  50. ci-pdf-converter-launch-dev:
  51. runs-on: ubuntu-latest
  52. strategy:
  53. matrix:
  54. node-version: [24.x]
  55. steps:
  56. - uses: actions/checkout@v4
  57. - uses: pnpm/action-setup@v4
  58. - uses: actions/setup-node@v4
  59. with:
  60. node-version: ${{ matrix.node-version }}
  61. cache: 'pnpm'
  62. - name: Install dependencies
  63. run: |
  64. pnpm add turbo --global
  65. pnpm install --frozen-lockfile
  66. - name: turbo run dev:pdf-converter:ci
  67. working-directory: ./apps/pdf-converter
  68. run: turbo run dev:pdf-converter:ci
  69. - name: Slack Notification
  70. uses: weseek/ghaction-slack-notification@master
  71. if: failure()
  72. with:
  73. type: ${{ job.status }}
  74. job_name: '*Node CI for growi-pdf-converter - launch-dev (${{ matrix.node-version }})*'
  75. channel: '#ci'
  76. isCompactMode: true
  77. url: ${{ secrets.SLACK_WEBHOOK_URL }}
  78. ci-pdf-converter-launch-prod:
  79. if: startsWith(github.head_ref, 'mergify/merge-queue/')
  80. runs-on: ubuntu-latest
  81. strategy:
  82. matrix:
  83. node-version: [24.x]
  84. steps:
  85. - uses: actions/checkout@v4
  86. - uses: pnpm/action-setup@v4
  87. - uses: actions/setup-node@v4
  88. with:
  89. node-version: ${{ matrix.node-version }}
  90. cache: 'pnpm'
  91. - name: Install turbo
  92. run: |
  93. pnpm add turbo --global
  94. - name: Install dependencies
  95. run: |
  96. pnpm install --frozen-lockfile
  97. - name: Restore dist
  98. uses: actions/cache/restore@v4
  99. with:
  100. path: |
  101. **/.turbo
  102. **/dist
  103. key: dist-pdf-converter-prod-${{ runner.OS }}-node${{ matrix.node-version }}-${{ github.sha }}
  104. restore-keys: |
  105. dist-pdf-converter-prod-${{ runner.OS }}-node${{ matrix.node-version }}-
  106. - name: Build
  107. working-directory: ./apps/pdf-converter
  108. run: |
  109. turbo run build
  110. - name: Assembling all dependencies
  111. run: |
  112. rm -rf out
  113. pnpm deploy out --prod --legacy --filter @growi/pdf-converter
  114. rm -rf apps/pdf-converter/node_modules && mv out/node_modules apps/pdf-converter/node_modules
  115. - name: pnpm run start:prod:ci
  116. working-directory: ./apps/pdf-converter
  117. run: pnpm run start:prod:ci
  118. - name: Slack Notification
  119. uses: weseek/ghaction-slack-notification@master
  120. if: failure()
  121. with:
  122. type: ${{ job.status }}
  123. job_name: '*Node CI for growi-pdf-converter - launch-prod (${{ matrix.node-version }})*'
  124. channel: '#ci'
  125. isCompactMode: true
  126. url: ${{ secrets.SLACK_WEBHOOK_URL }}
  127. - name: Cache dist
  128. uses: actions/cache/save@v4
  129. with:
  130. path: |
  131. **/.turbo
  132. **/dist
  133. key: dist-pdf-converter-prod-${{ runner.OS }}-node${{ matrix.node-version }}-${{ github.sha }}