mirror of
https://github.com/logseq/logseq.git
synced 2026-05-05 03:16:37 +00:00
Merge branch 'master' into feat/db
This commit is contained in:
14
.github/workflows/build-stage.yml
vendored
14
.github/workflows/build-stage.yml
vendored
@@ -4,6 +4,16 @@ name: Build-Stage
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
git-ref:
|
||||
description: "Release Git Ref (Which branch or tag to build?)"
|
||||
required: true
|
||||
default: "master"
|
||||
cloudflare-project-name:
|
||||
description: "Cloudflare pages project name"
|
||||
required: true
|
||||
default: "logseq-demo"
|
||||
|
||||
release:
|
||||
types: [released]
|
||||
|
||||
@@ -20,6 +30,8 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
with:
|
||||
ref: ${{ github.event.inputs.git-ref }}
|
||||
|
||||
- name: Setup Java JDK
|
||||
uses: actions/setup-java@v3
|
||||
@@ -50,7 +62,7 @@ jobs:
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: 2553ea8236c11ea0f88de28fce1cbfee
|
||||
projectName: 'logseq-demo'
|
||||
projectName: ${{ github.event.inputs.cloudflare-project-name }}
|
||||
directory: 'static'
|
||||
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: 'production'
|
||||
|
||||
52
.github/workflows/deploy-stage-to-master.yml
vendored
Normal file
52
.github/workflows/deploy-stage-to-master.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Deploy master to cloudflare pages for test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
|
||||
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/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: "static"
|
||||
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: "production"
|
||||
Reference in New Issue
Block a user