deploy.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. name: Deploy Website on push
  2. on:
  3. push:
  4. branches:
  5. - main
  6. jobs:
  7. deploy-push-playground-ftp:
  8. name: Deploy Push Playground Ftp
  9. if: github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip ci]')
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Checkout code
  13. uses: actions/checkout@v4
  14. with:
  15. fetch-depth: 0
  16. - name: Sed Config Base
  17. shell: bash
  18. run: |
  19. sed -i "s#VITE_COMPRESS\s*=.*#VITE_COMPRESS = gzip#g" ./playground/.env.production
  20. sed -i "s#VITE_PWA\s*=.*#VITE_PWA = true#g" ./playground/.env.production
  21. cat ./playground/.env.production
  22. - name: Setup Node
  23. uses: ./.github/actions/setup-node
  24. - name: Build
  25. run: pnpm build:play && pnpm build:docs
  26. - name: Sync Playground files
  27. uses: SamKirkland/FTP-Deploy-Action@v4.3.5
  28. with:
  29. server: ${{ secrets.PRO_FTP_HOST }}
  30. username: ${{ secrets.WEB_PLAYGROUND_FTP_ACCOUNT }}
  31. password: ${{ secrets.WEB_PLAYGROUND_FTP_PWSSWORD }}
  32. local-dir: ./playground/dist/
  33. - name: Sync Docs files
  34. uses: SamKirkland/FTP-Deploy-Action@v4.3.5
  35. with:
  36. server: ${{ secrets.PRO_FTP_HOST }}
  37. username: ${{ secrets.WEBSITE_FTP_ACCOUNT }}
  38. password: ${{ secrets.WEBSITE_FTP_PASSWORD }}
  39. local-dir: ./docs/.vitepress/dist/
  40. deploy-push-antd-ftp:
  41. name: Deploy Push Antd Ftp
  42. if: github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip ci]')
  43. runs-on: ubuntu-latest
  44. steps:
  45. - name: Checkout code
  46. uses: actions/checkout@v4
  47. with:
  48. fetch-depth: 0
  49. - name: Sed Config Base
  50. shell: bash
  51. run: |
  52. sed -i "s#VITE_COMPRESS\s*=.*#VITE_COMPRESS = gzip#g" ./apps/web-antd/.env.production
  53. sed -i "s#VITE_PWA\s*=.*#VITE_PWA = true#g" ./apps/web-antd/.env.production
  54. cat ./apps/web-antd/.env.production
  55. - name: Setup Node
  56. uses: ./.github/actions/setup-node
  57. - name: Build
  58. run: pnpm run build:antd
  59. - name: Sync files
  60. uses: SamKirkland/FTP-Deploy-Action@v4.3.5
  61. with:
  62. server: ${{ secrets.PRO_FTP_HOST }}
  63. username: ${{ secrets.WEB_ANTD_FTP_ACCOUNT }}
  64. password: ${{ secrets.WEB_ANTD_FTP_PASSWORD }}
  65. local-dir: ./apps/web-antd/dist/
  66. deploy-push-ele-ftp:
  67. name: Deploy Push Element Ftp
  68. if: github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip ci]')
  69. runs-on: ubuntu-latest
  70. steps:
  71. - name: Checkout code
  72. uses: actions/checkout@v4
  73. with:
  74. fetch-depth: 0
  75. - name: Sed Config Base
  76. shell: bash
  77. run: |
  78. sed -i "s#VITE_COMPRESS\s*=.*#VITE_COMPRESS = gzip#g" ./apps/web-ele/.env.production
  79. sed -i "s#VITE_PWA\s*=.*#VITE_PWA = true#g" ./apps/web-ele/.env.production
  80. cat ./apps/web-ele/.env.production
  81. - name: Setup Node
  82. uses: ./.github/actions/setup-node
  83. - name: Build
  84. run: pnpm run build:ele
  85. - name: Sync files
  86. uses: SamKirkland/FTP-Deploy-Action@v4.3.5
  87. with:
  88. server: ${{ secrets.PRO_FTP_HOST }}
  89. username: ${{ secrets.WEB_ELE_FTP_ACCOUNT }}
  90. password: ${{ secrets.WEB_ELE_FTP_PASSWORD }}
  91. local-dir: ./apps/web-ele/dist/
  92. deploy-push-naive-ftp:
  93. name: Deploy Push Naive Ftp
  94. if: github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip ci]')
  95. runs-on: ubuntu-latest
  96. steps:
  97. - name: Checkout code
  98. uses: actions/checkout@v4
  99. with:
  100. fetch-depth: 0
  101. - name: Sed Config Base
  102. shell: bash
  103. run: |
  104. sed -i "s#VITE_COMPRESS\s*=.*#VITE_COMPRESS = gzip#g" ./apps/web-naive/.env.production
  105. sed -i "s#VITE_PWA\s*=.*#VITE_PWA = true#g" ./apps/web-naive/.env.production
  106. cat ./apps/web-naive/.env.production
  107. - name: Setup Node
  108. uses: ./.github/actions/setup-node
  109. - name: Build
  110. run: pnpm run build:naive
  111. - name: Sync files
  112. uses: SamKirkland/FTP-Deploy-Action@v4.3.5
  113. with:
  114. server: ${{ secrets.PRO_FTP_HOST }}
  115. username: ${{ secrets.WEB_NAIVE_FTP_ACCOUNT }}
  116. password: ${{ secrets.WEB_NAIVE_FTP_PASSWORD }}
  117. local-dir: ./apps/web-naive/dist/