-
Notifications
You must be signed in to change notification settings - Fork 3
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
YangyangLi
committed
Jul 12, 2024
1 parent
ab64f08
commit 1e82fc9
Showing
2 changed files
with
48 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,47 @@ | ||
name: build docker image | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: 'Docs 构建,请选择分支' | ||
required: true | ||
default: 'master' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Login to Docker repository | ||
uses: docker/[email protected] | ||
with: | ||
registry: registry.cn-beijing.aliyuncs.com | ||
username: ${{ secrets.ACR_REGISTRY_USERNAME }} | ||
password: ${{ secrets.ACR_REGISTRY_PASSWORD }} | ||
- name: Setup ossutil | ||
uses: coscene-io/setup-ossutil@v2 | ||
with: | ||
# 填写Bucket所在地域的域名信息,可参考访问域名和数据中心。 | ||
endpoint: oss-cn-beijing.aliyuncs.com | ||
# AccessKeyID | ||
access-key-id: ${{ secrets.OSS_KEY_ID }} | ||
# AccessKeySceret | ||
access-key-secret: ${{ secrets.OSS_KEY_SECRET }} | ||
- name: Setup Node.js environment | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
- name: Build the Docker image and upload to oss | ||
run: | | ||
VERSION=$(cat version.txt) | ||
PUBLIC_URL=//cdn.authing.co/authing-docs-v3/${VERSION}/ | ||
TAG=registry.cn-beijing.aliyuncs.com/authing-next/authing-docs-v3:${VERSION} | ||
yarn config set registry https://registry.npmmirror.com | ||
yarn | ||
NODE_OPTIONS=--max-old-space-size=12000 PUBLIC_URL=$PUBLIC_URL yarn docs:build | ||
docker build -t ${TAG} . --no-cache | ||
docker push ${TAG} | ||
ossutil cp -r -f docs/.vuepress/dist oss://authing-cdn-cn-prod/authing-docs-v3/${VERSION}/ |
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 |
---|---|---|
@@ -1 +1 @@ | ||
0.0.47-lyy | ||
0.0.48 |