deploy-sync-test.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. name: Deploy new sync test
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. branch:
  6. description: "Git branch to build & deploy"
  7. required: true
  8. default: "feat/worker-sync"
  9. env:
  10. CLOJURE_VERSION: "1.11.1.1413"
  11. NODE_VERSION: "22"
  12. JAVA_VERSION: "11"
  13. jobs:
  14. build-and-deploy:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - name: Checkout selected branch
  18. uses: actions/checkout@v4
  19. with:
  20. ref: ${{ inputs.branch }}
  21. fetch-depth: 0
  22. - name: Setup Java JDK
  23. uses: actions/setup-java@v4
  24. with:
  25. distribution: "zulu"
  26. java-version: ${{ env.JAVA_VERSION }}
  27. - name: Set up Node
  28. uses: actions/setup-node@v4
  29. with:
  30. node-version: ${{ env.NODE_VERSION }}
  31. - name: Setup Clojure
  32. uses: DeLaGuardo/[email protected]
  33. with:
  34. cli: ${{ env.CLOJURE_VERSION }}
  35. - name: Install Yarn deps
  36. run: yarn install --frozen-lockfile
  37. - name: Set build environment flags
  38. run: |
  39. echo "ENABLE_FILE_SYNC_PRODUCTION=true" >> $GITHUB_ENV
  40. echo "ENABLE_RTC_SYNC_PRODUCTION=true" >> $GITHUB_ENV
  41. - name: Build web + workers
  42. run: |
  43. yarn gulp:build
  44. clojure -M:cljs release app db-worker inference-worker \
  45. --config-merge '{:compiler-options {:source-map true :source-map-include-sources-content true :source-map-detail-level :symbols}}'
  46. yarn webpack-app-build
  47. rsync -avz \
  48. --exclude node_modules \
  49. --exclude android \
  50. --exclude ios \
  51. --exclude mobile \
  52. ./static/ ./public/
  53. rm ./public/js/*.map
  54. env:
  55. LOGSEQ_POSTHOG_TOKEN: ${{ secrets.LOGSEQ_POSTHOG_TOKEN }}
  56. - name: Publish to Cloudflare Pages
  57. uses: cloudflare/pages-action@1
  58. with:
  59. apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
  60. accountId: 2553ea8236c11ea0f88de28fce1cbfee
  61. projectName: "test-sync"
  62. directory: "public"
  63. gitHubToken: ${{ secrets.GITHUB_TOKEN }}
  64. branch: ${{ inputs.branch }}