Explorar el Código

chore: add GitHub workflow

charlie hace 1 año
padre
commit
e7520cb095
Se han modificado 1 ficheros con 56 adiciones y 0 borrados
  1. 56 0
      .github/workflows/deploy-db-test-pages.yml

+ 56 - 0
.github/workflows/deploy-db-test-pages.yml

@@ -0,0 +1,56 @@
+name: Deploy DB Test Version to Cloud
+
+on:
+  push:
+    branches: ["test/db"]
+
+env:
+  CLOJURE_VERSION: "1.10.1.763"
+  NODE_VERSION: "18"
+  JAVA_VERSION: "11"
+
+jobs:
+  build-and-deploy:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v3
+
+      - name: Setup Java JDK
+        uses: actions/setup-java@v3
+        with:
+          distribution: "zulu"
+          java-version: ${{ env.JAVA_VERSION }}
+
+      - name: Set up Node
+        uses: actions/setup-node@v3
+        with:
+          node-version: ${{ env.NODE_VERSION }}
+
+      - name: Setup clojure
+        uses: DeLaGuardo/[email protected]
+        with:
+          cli: ${{ env.CLOJURE_VERSION }}
+
+      - name: Fetch yarn deps
+        run: yarn install --frozen-lockfile
+
+      - name: Set Build Environment Variables
+        run: |
+          echo "ENABLE_FILE_SYNC_PRODUCTION=false" >> $GITHUB_ENV
+
+      - name: Build Released-Web
+        run: |
+          yarn gulp:build && clojure -M:cljs release app  --config-merge '{:compiler-options {:source-map-include-sources-content false :source-map-detail-level :symbols}}'
+          rsync -avz --exclude node_modules --exclude android --exclude ios ./static/ ./public/static/
+          ls -lR ./public
+
+      - name: Publish to Cloudflare Pages
+        uses: cloudflare/pages-action@1
+        with:
+          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+          accountId: 2553ea8236c11ea0f88de28fce1cbfee
+          projectName: " logseq-db-test"
+          directory: "public"
+          gitHubToken: ${{ secrets.GITHUB_TOKEN }}
+          branch: "main"