|
|
@@ -12,7 +12,7 @@ on:
|
|
|
cloudflare-project-name:
|
|
|
description: "Cloudflare pages project name"
|
|
|
required: true
|
|
|
- default: "logseq-demo"
|
|
|
+ default: "logseq-dev"
|
|
|
|
|
|
release:
|
|
|
types: [released]
|
|
|
@@ -25,8 +25,6 @@ env:
|
|
|
jobs:
|
|
|
build:
|
|
|
runs-on: ubuntu-latest
|
|
|
- env:
|
|
|
- asset-path: ${GITHUB_REF##*/}/static/js/
|
|
|
|
|
|
steps:
|
|
|
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
|
|
@@ -52,17 +50,22 @@ jobs:
|
|
|
- name: Fetch yarn deps
|
|
|
run: yarn cache clean && 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 '{:asset-path "${{env.asset-path}}" :compiler-options {:source-map-include-sources-content false :source-map-detail-level :symbols}}'
|
|
|
- ls -ah ./static/js
|
|
|
+ yarn gulp:build && clojure -M:cljs release app --config-merge '{:compiler-options {:source-map true :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: ${{ github.event.inputs.cloudflare-project-name || 'logseq-demo' }}
|
|
|
- directory: 'static'
|
|
|
+ projectName: ${{ github.event.inputs.cloudflare-project-name || 'logseq-dev' }}
|
|
|
+ directory: 'public'
|
|
|
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
|
branch: 'production'
|