-
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
39 changed files
with
10,697 additions
and
4 deletions.
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,11 @@ | ||
node_modules | ||
*/logs | ||
*/run | ||
*/typings | ||
.idea | ||
.github | ||
nginx | ||
docs | ||
eslint.config.js | ||
.gitignore | ||
|
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,71 @@ | ||
# CD持续交付 | ||
# - 部署到Github Pages | ||
# - 部署到Vercel托管平台 | ||
# - 发布新的Github Release | ||
# 参考:https://v2.vuepress.vuejs.org/zh/guide/deployment.html#github-pages | ||
# | ||
|
||
name: CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- next | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# 版本发布 | ||
release: | ||
name: 创建Github发布 | ||
runs-on: ubuntu-latest | ||
# 主库next且执行release更新时执行 | ||
if: github.repository == '142vip/142vip-oauth' && startsWith(github.event.head_commit.message, 'chore(release):') | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.TOKEN }} | ||
persist-credentials: false | ||
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录 | ||
fetch-depth: 0 | ||
|
||
# 打成压缩包 | ||
- name: Create Zip Package | ||
run: | | ||
zip -r 142vip-oauth.zip . \ | ||
-x "node_modules/*" \ | ||
-x "*.git*" | ||
# 提取版本号 | ||
- name: Get New Version Number | ||
id: releaseVersion | ||
run: | | ||
echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | ||
# 创建发布版本 | ||
- name: Create New Release | ||
id: createRelease | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} | ||
with: | ||
tag_name: v${{ steps.releaseVersion.outputs.version }} | ||
release_name: v${{ steps.releaseVersion.outputs.version }} | ||
body: | | ||
Release ${{ steps.releaseVersion.outputs.version }} | ||
### ✨ Features | ||
### 🐛 Bug Fixes | ||
# 更新资源 | ||
- name: Upload Resource Assets | ||
uses: actions/upload-release-asset@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} | ||
with: | ||
upload_url: ${{ steps.createRelease.outputs.upload_url }} | ||
asset_path: ./142vip-oauth.zip | ||
asset_name: 142vip-oauth.zip | ||
asset_content_type: application/zip |
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,68 @@ | ||
# 代码检查 | ||
name: CI | ||
|
||
# 触发条件 | ||
on: | ||
# 提PR到next分支触发CI | ||
# pull_request: | ||
# branches: | ||
# - next | ||
# push: | ||
# branches: | ||
# - next | ||
|
||
# 手动触发部署 | ||
workflow_dispatch: | ||
|
||
schedule: | ||
- cron: '0 0 1 * *' | ||
|
||
jobs: | ||
# 本地构建 | ||
Base-Build: | ||
name: 基础编译构建 | ||
runs-on: ubuntu-latest | ||
if: github.repository == '142vip/142vip-oauth' && github.event_name == 'pull_request' | ||
permissions: | ||
actions: read | ||
pull-requests: read | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.TOKEN }} | ||
persist-credentials: false | ||
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录 | ||
fetch-depth: 0 | ||
|
||
# 安装PNPM | ||
- name: PNPM Install | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 7.33.2 | ||
|
||
# 安装Node环境 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.18.0 | ||
# 淘宝镜像加速 | ||
registry-url: 'https://registry.npmmirror.com' | ||
# 缓存 | ||
cache: pnpm | ||
|
||
# 下载依赖,并执行初始化脚本:钩子函数、思维导图构建 | ||
- name: Install Dependencies | ||
run: | | ||
./scripts/ci | ||
# todo lint校验待优化 | ||
# - name: Code LintFix | ||
# run: | | ||
# ./scripts/lint | ||
|
||
- name: Build Midway Example Code | ||
run: | | ||
./scripts/build xxx | ||
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,21 @@ | ||
logs/ | ||
node_modules/ | ||
package-lock.json | ||
coverage/ | ||
.idea/ | ||
run/ | ||
.DS_Store | ||
typings/ | ||
.vscode | ||
/**/.DS_Store | ||
/.vscode/ | ||
dist/ | ||
*/jsconfig.json | ||
*/.turbo/ | ||
.husky | ||
/**/jsconfig.json | ||
/**/**/.nuxt/ | ||
/.turbo/ | ||
**/.turbo/ | ||
**/**/.output/ | ||
|
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,75 @@ | ||
/** | ||
* markdownlint-cli格式化markdown文档 | ||
* 规则参考:https://github.com/updownpress/markdown-lint/tree/master/rules | ||
*/ | ||
module.exports = { | ||
default: true, | ||
MD001: false, | ||
MD003: { | ||
style: 'atx', | ||
}, | ||
MD004: { | ||
style: 'dash', | ||
}, | ||
MD013: false, | ||
MD024: { | ||
allow_different_nesting: true, | ||
}, | ||
MD025: { | ||
front_matter_title: '', | ||
}, | ||
MD033: { | ||
allowed_elements: [ | ||
'br', | ||
'template', | ||
'script', | ||
'style', | ||
'ArtPlayer', | ||
'AudioPlayer', | ||
'AutoCatalog', | ||
'Badge', | ||
'BiliBili', | ||
'Catalog', | ||
'CodePen', | ||
'DemoProject', | ||
'FontIcon', | ||
'HighlightPanel', | ||
'ProjectLink', | ||
'PDF', | ||
'Replit', | ||
'Share', | ||
'SiteInfo', | ||
'StackBlitz', | ||
'XiGua', | ||
'VidStack', | ||
'VideoPlayer', | ||
'YouTube', | ||
'AppearanceSwitch', | ||
'HopeIcon', | ||
'FlowChartPlayground', | ||
'IconDisplay', | ||
'KatexPlayground', | ||
'PrintButton', | ||
'ThemeColorPicker', | ||
'ToggleFullScreenButton', | ||
'ToggleRTLButton', | ||
'div', | ||
'a', | ||
'p', | ||
'img', | ||
'table', | ||
'strong', | ||
'sub', | ||
], | ||
}, | ||
MD035: { | ||
style: '---', | ||
}, | ||
MD036: false, | ||
MD040: true, | ||
MD045: false, | ||
MD041: false, | ||
MD042: false, | ||
MD046: false, | ||
MD049: false, | ||
} |
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,5 @@ | ||
**/node_modules/** | ||
LICENSE | ||
.idea | ||
.husky | ||
.github |
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,2 @@ | ||
shamefully-hoist=true | ||
registry=https://registry.npmmirror.com |
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
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,2 +1,3 @@ | ||
# core-x | ||
核心库开源,x代表一切可能性 | ||
# @142vip/core-x | ||
|
||
坚持开源,x代表一切都有可能 |
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,3 @@ | ||
{ | ||
"name": "egg-demo" | ||
} |
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,27 @@ | ||
# | ||
# 支持服务: | ||
# | ||
version: '2' | ||
services: | ||
oauth-client: | ||
image: xxxx | ||
container_name: oauth-client | ||
hostname: oauth-client | ||
ports: | ||
- '0.0.0.0:8000:80' | ||
networks: | ||
net: | ||
ipv4_address: 172.30.0.12 | ||
|
||
# 创建桥接网络 | ||
networks: | ||
# 桥接网络名称,配合文件前缀,最后为dev_test_env_net 参考:https://www.jianshu.com/p/d70c61d45364 | ||
net: | ||
driver: bridge | ||
# external: true | ||
ipam: | ||
driver: default | ||
config: | ||
- subnet: 172.30.0.0/24 | ||
# 网关 | ||
gateway: 172.30.0.1 |
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,35 @@ | ||
## 技术栈 | ||
|
||
- Nuxtjs框架 | ||
- Vue-Ant-Design框架 | ||
- Oauth2登录授权 | ||
|
||
### 功能细节 | ||
|
||
### 存在问题 | ||
|
||
### 开发 | ||
|
||
> 总的来说,是基于Vue来进行页面开发,针对SSR和页面效果会选用不同的框架; | ||
- UI框架:vue-ant-design | ||
|
||
- 开发框架:Nuxtjs | ||
|
||
- 前端请求:axios | ||
|
||
### 部署 | ||
|
||
阿里云 | ||
|
||
### 脚本 | ||
|
||
```shell | ||
##bin/bash | ||
## 阿里云密码 | ||
pwd=${1} | ||
|
||
## 登录阿里云 | ||
docker login --username=litiao2237221210 --password=${pwd} registry.cn-hangzhou.aliyuncs.com | ||
|
||
``` |
Oops, something went wrong.