From a035be233e4dea102a2c924a021421d312a9e9de Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Tue, 14 Nov 2023 15:12:57 +0800 Subject: [PATCH] add stage deployment for the master branch --- .github/workflows/deploy-stage-master.yml | 41 +++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/deploy-stage-master.yml diff --git a/.github/workflows/deploy-stage-master.yml b/.github/workflows/deploy-stage-master.yml new file mode 100644 index 00000000000..ad251e2e74a --- /dev/null +++ b/.github/workflows/deploy-stage-master.yml @@ -0,0 +1,41 @@ +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/setup-clojure@11.0 + with: + cli: ${{ env.CLOJURE_VERSION }} + + - name: Fetch yarn deps + run: yarn cache clean && yarn install --frozen-lockfile + + - 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 '*.js.map' --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-dev" + directory: "public" + gitHubToken: ${{ secrets.GITHUB_TOKEN }} + branch: "main"