Skip to content

Commit de57416

Browse files
author
huangliling
committed
feat: LC 文档
1 parent 88287cf commit de57416

File tree

1,014 files changed

+118407
-57
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,014 files changed

+118407
-57
lines changed
131 KB
Loading

.contributing/img/ci-failed.png

504 KB
Loading

.contributing/img/ci-preview.png

344 KB
Loading

.contributing/img/compare-changes.png

265 KB
Loading
39.6 KB
Loading

.contributing/img/fetch-and-merge.png

231 KB
Loading

.contributing/img/forked.png

47 KB
Loading

.contributing/img/git-commit.png

172 KB
Loading

.contributing/img/git-stage.png

120 KB
Loading
315 KB
Loading

.contributing/img/github-fork.png

215 KB
Loading

.contributing/img/github-preview.png

16.2 KB
Loading

.contributing/img/mdx-config.png

282 KB
Loading
191 KB
Loading

.contributing/img/open-a-pr.png

273 KB
Loading

.contributing/img/split-preview.png

766 KB
Loading
68.9 KB
Loading
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Delete Preview Environment
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
env:
8+
REGION: cn-n1 # set this to your LeanCloud region, e.g. cn-n1
9+
APP_ID: j1sU6A4GIEiCzwDu5l9Klk03-9Nh9j0Va # set this to your App ID on LeanCloud
10+
GROUP: web # set this to your group, e.g. web
11+
12+
jobs:
13+
delete-preview-environment:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
deployments: write
17+
steps:
18+
- name: Install lean-cli
19+
run: |
20+
sudo curl -L -o /bin/lean https://github.com/leancloud/lean-cli/releases/download/v1.2.3/lean-linux-x64
21+
sudo chmod +x /bin/lean
22+
- name: Delete Preview Environment
23+
run: |
24+
lean login --region ${{ env.REGION }} --token ${{ secrets.LC_ACCESS_TOKEN }}
25+
lean switch --region ${{ env.REGION }} --group ${{ env.GROUP }} ${{ env.APP_ID }}
26+
lean preview delete
27+
- uses: strumwolf/delete-deployment-environment@v2
28+
with:
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
environment: preview/${{ github.head_ref }}
31+
onlyDeactivateDeployments: true
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy Preview Environment
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
env:
8+
REGION: cn-n1 # set this to your LeanCloud region, e.g. cn-n1
9+
APP_ID: j1sU6A4GIEiCzwDu5l9Klk03-9Nh9j0Va # set this to your App ID on LeanCloud
10+
GROUP: web # set this to your group, e.g. web
11+
12+
jobs:
13+
deploy-preview-environment:
14+
runs-on: ubuntu-latest
15+
environment:
16+
name: preview/${{ github.head_ref }}
17+
url: ${{ env.PREVIEW_URL }}
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Install lean-cli
21+
run: |
22+
sudo curl -L -o /bin/lean https://github.com/leancloud/lean-cli/releases/download/v1.2.3/lean-linux-x64
23+
sudo chmod +x /bin/lean
24+
- name: Deploy
25+
run: |
26+
lean login --region ${{ env.REGION }} --token ${{ secrets.LC_ACCESS_TOKEN }}
27+
lean switch --region ${{ env.REGION }} --group ${{ env.GROUP }} ${{ env.APP_ID }}
28+
PREVIEW_URL=$(lean preview deploy)
29+
echo "PREVIEW_URL=$PREVIEW_URL" >> $GITHUB_ENV

.github/workflows/prod-deployment.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Controls when the action will run. Triggers the workflow on push request for the master branch
2+
on:
3+
push:
4+
branches: [master]
5+
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
with:
13+
token: ${{ secrets.CHECKOUT_TOKEN }}
14+
- name: Deploy to LeanEngine
15+
uses: enflo/[email protected]
16+
with:
17+
curl: -X POST https://console-api.cn-n1.lcops.cn/1.1/engine/groups/web/production/version?gitTag=${{ github.sha }}&token=${{ secrets.LC_DEPLOY_TOKEN }}

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Dependencies
2+
/node_modules
3+
package-lock.json
4+
5+
# Production
6+
/build
7+
/build-cn
8+
/build-hk
9+
/build-leancloud
10+
11+
# Generated files
12+
.docusaurus
13+
.cache-loader
14+
15+
# Misc
16+
.DS_Store
17+
.env.local
18+
.env.development.local
19+
.env.test.local
20+
.env.production.local
21+
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*
25+
26+
# IDE
27+
/.idea/
28+
/.vscode/

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
registry=https://registry.npmmirror.com
2+
disturl=https://npmmirror.com/mirrors/node

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18.8.0

.prettierrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)