deploy-db-pages.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: Deploy DB Version to Cloud
  2. on:
  3. push:
  4. branches: ["feat/db"]
  5. env:
  6. CLOJURE_VERSION: "1.10.1.763"
  7. NODE_VERSION: "18"
  8. JAVA_VERSION: "11"
  9. jobs:
  10. build-and-deploy:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v3
  14. - name: Setup Java JDK
  15. uses: actions/setup-java@v3
  16. with:
  17. distribution: "zulu"
  18. java-version: ${{ env.JAVA_VERSION }}
  19. - name: Set up Node
  20. uses: actions/setup-node@v3
  21. with:
  22. node-version: ${{ env.NODE_VERSION }}
  23. - name: Setup clojure
  24. uses: DeLaGuardo/[email protected]
  25. with:
  26. cli: ${{ env.CLOJURE_VERSION }}
  27. - name: Fetch yarn deps
  28. run: yarn cache clean && yarn install --frozen-lockfile
  29. - name: Set Build Environment Variables
  30. run: |
  31. echo "ENABLE_FILE_SYNC_PRODUCTION=false" >> $GITHUB_ENV
  32. - name: Build Released-Web
  33. run: |
  34. yarn gulp:build && clojure -M:cljs release app --config-merge '{:compiler-options {:source-map-include-sources-content false :source-map-detail-level :symbols}}'
  35. rsync -avz --exclude node_modules --exclude android --exclude ios ./static/ ./public/static/
  36. ls -lR ./public
  37. - name: Publish to Cloudflare Pages
  38. uses: cloudflare/pages-action@1
  39. with:
  40. apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
  41. accountId: 2553ea8236c11ea0f88de28fce1cbfee
  42. projectName: "logseq-db-demo"
  43. directory: "public"
  44. gitHubToken: ${{ secrets.GITHUB_TOKEN }}
  45. branch: "main"