-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
153 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: AutoCorrect | ||
on: [pull_request] | ||
jobs: | ||
autocorrect: | ||
name: Check text autocorrect | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out source | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Check | ||
uses: huacnlee/autocorrect-action@main | ||
with: | ||
use_npm: true | ||
|
||
- name: Report ReviewDog | ||
if: failure() | ||
uses: huacnlee/autocorrect-action@main | ||
env: | ||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
use_npm: true | ||
reviewdog: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Build | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "!main" | ||
- "!canary" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build Test | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
|
||
- name: install dependency npm | ||
run: yarn | ||
|
||
- name: build canary env dist file | ||
run: | | ||
yarn build:canary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Deploy Canary | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- canary | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy_canary: | ||
name: build | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Download ossutils zip | ||
run: | | ||
wget https://github.com/aliyun/ossutil/releases/download/v1.7.17/ossutil-v1.7.17-linux-amd64.zip | ||
unzip ossutil-v1.7.17-linux-amd64.zip && cp ./ossutil-v1.7.17-linux-amd64/ossutil ${{github.workspace}}/ && chmod +x ${{github.workspace}}/ossutil | ||
- name: Test ossutil cli is ok | ||
run: | | ||
${{github.workspace}}/ossutil --version | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
|
||
- name: install dependency npm | ||
run: yarn | ||
|
||
- name: build canary env dist file | ||
env: | ||
PROXY: canary | ||
run: | | ||
yarn build | ||
- name: upload canary dist to oss | ||
run: | | ||
${{github.workspace}}/ossutil cp dist/ oss://lb-assets/github/canary/longportapp.com/learn/wiki/ -u -r -j 10 -e oss-cn-hangzhou.aliyuncs.com -i ${{ secrets.FE_LB_ASSET_ACCESS_KEY_ID }} -k ${{ secrets.FE_LB_ASSET_ACCESS_KEY_SECRET }} --exclude "*.html" --meta=Cache-Control:max-age=31536000 | ||
${{github.workspace}}/ossutil cp dist/ oss://lb-assets/github/canary/longportapp.com/learn/wiki/ -u -r -j 10 -e oss-cn-hangzhou.aliyuncs.com -i ${{ secrets.FE_LB_ASSET_ACCESS_KEY_ID }} -k ${{ secrets.FE_LB_ASSET_ACCESS_KEY_SECRET }} --include "*.html" --meta=Cache-Control:no-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Deploy Release | ||
on: | ||
push: | ||
branches: | ||
- release | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy_release: | ||
name: build | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
|
||
- name: Download ossutils zip | ||
run: | | ||
wget https://github.com/aliyun/ossutil/releases/download/v1.7.17/ossutil-v1.7.17-linux-amd64.zip | ||
unzip ossutil-v1.7.17-linux-amd64.zip && cp ./ossutil-v1.7.17-linux-amd64/ossutil ${{github.workspace}}/ && chmod +x ${{github.workspace}}/ossutil | ||
- name: Test ossutil cli is ok | ||
run: | | ||
${{github.workspace}}/ossutil --version | ||
- name: install dependency npm | ||
run: yarn | ||
|
||
- name: build release env dist file | ||
env: | ||
PROXY: release | ||
run: yarn build | ||
|
||
- name: upload canary dist to oss | ||
run: | | ||
${{github.workspace}}/ossutil cp dist/ oss://lb-assets/github/release/longportapp.com/learn/wiki/ -u -r -j 10 -e oss-cn-hangzhou.aliyuncs.com -i ${{ secrets.FE_LB_ASSET_ACCESS_KEY_ID }} -k ${{ secrets.FE_LB_ASSET_ACCESS_KEY_SECRET }} --exclude "*.html" --meta=Cache-Control:max-age=31536000 | ||
${{github.workspace}}/ossutil cp dist/ oss://lb-assets/github/release/longportapp.com/learn/wiki/ -u -r -j 10 -e oss-cn-hangzhou.aliyuncs.com -i ${{ secrets.FE_LB_ASSET_ACCESS_KEY_ID }} -k ${{ secrets.FE_LB_ASSET_ACCESS_KEY_SECRET }} --include "*.html" --meta=Cache-Control:no-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters