Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions .github/workflows/CD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on:
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
# 阿里云仓库信息
REGISTRY: registry.cn-hangzhou.aliyuncs.com
UserName: mmdapl


jobs:
install-init:
Expand Down Expand Up @@ -130,7 +134,7 @@ jobs:
run: |
zip -r JavaScriptCollection.zip . \
-x "node_modules/*" \
-x ".git/*" \
-x ".git/*"

# 提取版本号
- name: Get New Version Number
Expand Down Expand Up @@ -162,4 +166,37 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./JavaScriptCollection.zip
asset_name: JavaScriptCollection.zip
asset_content_type: application/zip
asset_content_type: application/zip

# Deploy-ESC:
# name: "部署到ESC服务器"
# needs: install-init
# runs-on: ubuntu-latest
# ## 主库master、next且执行release更新时执行
# if: github.repository == '142vip/JavaScriptCollection' && startsWith(github.event.head_commit.message, 'chore(release):')
#
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
#
# - name: Get Current Version
# id: version
# uses: ashley-taylor/read-json-property-action@v1.0
# with:
# path: ./package.json
# property: version
#
# # 拉取镜像,更新服务
# - name: Pull Image And Update ESC
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.SERVER_HOST }}
# port: ${{ secrets.SERVER_PORT }}
# username: ${{ secrets.SERVER_USERNAME }}
# password: ${{ secrets.SERVER_PASSWORD }}
# script: |
# docker images
# echo "-----------正在运行的服务--------"
# docker ps
# cd /service_env/ && git reset --hard && git pull origin main
# bash ./scripts/book_doc.deploy.sh jsc ${{steps.version.outputs.value}}
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
runs-on: ubuntu-latest
needs: install-init
## 主库master、next且执行release更新时执行
if: github.repository == '142vip/408CSFamily' && startsWith(github.event.head_commit.message, 'chore(release):')
if: github.repository == '142vip/JavaScriptCollection' && startsWith(github.event.head_commit.message, 'chore(release):')
permissions:
actions: read
pull-requests: read
Expand Down
81 changes: 0 additions & 81 deletions .github/workflows/esc-deploy.yml

This file was deleted.